From 16333b0c697bb1c4222aa4a46e5ee0bec54bde88 Mon Sep 17 00:00:00 2001 From: axel Date: Wed, 14 Dec 2005 10:33:13 +1000 Subject: [PATCH] Simplify pwd function darcs-hash:20051214003313-ac50b-697691ebc5cedddde35307bee465b3083b91c00e.gz --- init/fish_function.fish | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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 #