show workspace name

This commit is contained in:
Thomas Lovén 2021-02-18 21:00:13 +01:00
parent 2d9809f553
commit 24ae1d2c7c
2 changed files with 5 additions and 2 deletions

View File

@ -3,7 +3,10 @@ function fish_prompt
set -l host (hostname -s) set -l host (hostname -s)
if set -q DEVCONTAINER if set -q DEVCONTAINER
set host DEV set host (ls /workspaces | head -n 1)
if test -z "$host"
set host DEV
end
end end
set_color (echo "$host" | md5sum | cut -c-6) set_color (echo "$host" | md5sum | cut -c-6)
echo -sn $host echo -sn $host

View File

@ -4,6 +4,6 @@ cd "$(dirname "$0")/.."
docker build . -t dotfiles -f test/Dockerfile --force-rm 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 docker rmi dotfiles