chore: make fish_cwd_prompt return ~/media instead of radio/media when cwd parent directory is $HOME
parent
707705a92b
commit
d534ce7ab0
|
@ -24,9 +24,15 @@ function fish_cwd_prompt
|
||||||
case "/"
|
case "/"
|
||||||
printf "/"
|
printf "/"
|
||||||
case "*"
|
case "*"
|
||||||
set -l parent_dir (basename (dirname $cwd))
|
set -l parent_dir (dirname $cwd)
|
||||||
test $parent_dir = "/" || printf "%s" $parent_dir
|
switch "$parent_dir"
|
||||||
printf '/%s' (basename $cwd)
|
case "$HOME"
|
||||||
|
printf "~/%s" (basename $cwd)
|
||||||
|
case "/"
|
||||||
|
printf "/%s" (basename $cwd)
|
||||||
|
case "*"
|
||||||
|
printf "%s/%s" (basename $parent_dir) (basename $cwd)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue