aboutsummaryrefslogtreecommitdiffhomepage
path: root/init
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2005-12-14 10:33:13 +1000
committerGravatar axel <axel@liljencrantz.se>2005-12-14 10:33:13 +1000
commit16333b0c697bb1c4222aa4a46e5ee0bec54bde88 (patch)
tree263ef925b7d801658de209b1913d9748d9d34766 /init
parente4fa0e1000dbb02c382642fb07ba219efdd4947e (diff)
Simplify pwd function
darcs-hash:20051214003313-ac50b-697691ebc5cedddde35307bee465b3083b91c00e.gz
Diffstat (limited to 'init')
-rw-r--r--init/fish_function.fish8
1 files changed, 1 insertions, 7 deletions
diff --git a/init/fish_function.fish b/init/fish_function.fish
index bd8a3d80..d2b4c113 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
#