fix: fish prompt in root directory
parent
8249bb9528
commit
098cb102d4
|
@ -18,8 +18,16 @@ end
|
||||||
# Current working directory prompt
|
# Current working directory prompt
|
||||||
function fish_cwd_prompt
|
function fish_cwd_prompt
|
||||||
set -l cwd (pwd)
|
set -l cwd (pwd)
|
||||||
test $cwd = $HOME && printf "~" || \
|
switch "$cwd"
|
||||||
printf "%s/%s" (basename (dirname $cwd)) (basename $cwd)
|
case "$HOME"
|
||||||
|
printf "~"
|
||||||
|
case "/"
|
||||||
|
printf "/"
|
||||||
|
case "*"
|
||||||
|
set -l parent_dir (basename (dirname $cwd))
|
||||||
|
test $parent_dir = "/" || printf "%s" $parent_dir
|
||||||
|
printf '/%s' (basename $cwd)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Guix environment prompt
|
# Guix environment prompt
|
||||||
|
|
Loading…
Reference in New Issue