mirror of
https://github.com/bingohuang/docker-labs.git
synced 2025-10-04 01:17:49 +08:00
Add fancy bash prompt from orchestration workshop (#28)
* Add bash prompt * remove curly braces * Change shell from ash to bash * Add inputrc for bash
This commit is contained in:
committed by
Marcos Nils
parent
6371ee665e
commit
d3e20724e9
22
docker-prompt
Executable file
22
docker-prompt
Executable file
@@ -0,0 +1,22 @@
|
||||
|
||||
#!/bin/sh
|
||||
case "$DOCKER_HOST" in
|
||||
*:3376)
|
||||
echo swarm
|
||||
;;
|
||||
*:2376)
|
||||
echo $DOCKER_MACHINE_NAME
|
||||
;;
|
||||
*:2375)
|
||||
echo $DOCKER_MACHINE_NAME
|
||||
;;
|
||||
*:55555)
|
||||
echo $DOCKER_MACHINE_NAME
|
||||
;;
|
||||
"")
|
||||
echo local
|
||||
;;
|
||||
*)
|
||||
echo unknown
|
||||
;;
|
||||
esac
|
Reference in New Issue
Block a user