diff --git a/init/fish_function.fish b/init/fish_function.fish index bd8a3d805..d2b4c1132 100644 --- a/init/fish_function.fish +++ b/init/fish_function.fish @@ -238,13 +238,7 @@ end # function pwd -d "Print working directory" - set out (command pwd $argv) - if echo $out| grep \^$HOME >/dev/null - printf \~ - echo $out |cut -b (echo $HOME|wc -c)- ^/dev/null - else - printf "%s\n" $out - end + command pwd | sed -re "s|^$HOME|~|" end #