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 "/"
|
||||
printf "/"
|
||||
case "*"
|
||||
set -l parent_dir (basename (dirname $cwd))
|
||||
test $parent_dir = "/" || printf "%s" $parent_dir
|
||||
printf '/%s' (basename $cwd)
|
||||
set -l parent_dir (dirname $cwd)
|
||||
switch "$parent_dir"
|
||||
case "$HOME"
|
||||
printf "~/%s" (basename $cwd)
|
||||
case "/"
|
||||
printf "/%s" (basename $cwd)
|
||||
case "*"
|
||||
printf "%s/%s" (basename $parent_dir) (basename $cwd)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue