aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/pwd.fish
diff options
context:
space:
mode:
authorGravatar liljencrantz <liljencrantz@gmail.com>2007-09-23 05:07:34 +1000
committerGravatar liljencrantz <liljencrantz@gmail.com>2007-09-23 05:07:34 +1000
commit5ecd0e22bf6d4388b18de1e828b16c3853b3adc5 (patch)
tree0ededfb65467b4b53764f6e8604173856c2239e9 /share/functions/pwd.fish
parent1420744669a3207c7259c0451b6c427435edc48b (diff)
Remove a few calls to the test command in favour of the switch builtin to speed statup up
darcs-hash:20070922190734-75c98-0e63a0ed6685edc2c9aa941f0b26c14466c7af6a.gz
Diffstat (limited to 'share/functions/pwd.fish')
-rw-r--r--share/functions/pwd.fish8
1 files changed, 6 insertions, 2 deletions
diff --git a/share/functions/pwd.fish b/share/functions/pwd.fish
index 6d1c3f58..d51fe5c6 100644
--- a/share/functions/pwd.fish
+++ b/share/functions/pwd.fish
@@ -3,12 +3,16 @@
# Also drop '/private' directories on OS X.
#
-if test (uname) = Darwin
+switch (uname)
+
+ case Darwin
function pwd --description "Print working directory"
echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|"
end
-else
+
+ case '*'
function pwd --description "Print working directory"
echo $PWD | sed -e "s|^$HOME|~|"
end
+
end \ No newline at end of file