diff --git a/fish/functions/fish_prompt.fish b/fish/functions/fish_prompt.fish index 758b789..88670d8 100644 --- a/fish/functions/fish_prompt.fish +++ b/fish/functions/fish_prompt.fish @@ -3,7 +3,10 @@ function fish_prompt set -l host (hostname -s) if set -q DEVCONTAINER - set host DEV + set host (ls /workspaces | head -n 1) + if test -z "$host" + set host DEV + end end set_color (echo "$host" | md5sum | cut -c-6) echo -sn $host diff --git a/test/run_test b/test/run_test index 8b3c6dc..f80e5eb 100755 --- a/test/run_test +++ b/test/run_test @@ -4,6 +4,6 @@ cd "$(dirname "$0")/.." docker build . -t dotfiles -f test/Dockerfile --force-rm -docker run --rm -it dotfiles zsh +docker run --rm -it -v $(pwd):/workspaces/test dotfiles zsh docker rmi dotfiles \ No newline at end of file