mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
18 lines
No EOL
351 B
Fish
18 lines
No EOL
351 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 |