mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 10:43:32 +08:00
5ecd0e22bf
darcs-hash:20070922190734-75c98-0e63a0ed6685edc2c9aa941f0b26c14466c7af6a.gz
18 lines
352 B
Fish
18 lines
352 B
Fish
#
|
|
# Make pwd print out the home directory as a tilde.
|
|
# Also drop '/private' directories on OS X.
|
|
#
|
|
|
|
switch (uname)
|
|
|
|
case Darwin
|
|
function pwd --description "Print working directory"
|
|
echo $PWD | sed -e 's|/private||' -e "s|^$HOME|~|"
|
|
end
|
|
|
|
case '*'
|
|
function pwd --description "Print working directory"
|
|
echo $PWD | sed -e "s|^$HOME|~|"
|
|
end
|
|
|
|
end |