mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08:00
Simplify pwd function
darcs-hash:20051214003313-ac50b-697691ebc5cedddde35307bee465b3083b91c00e.gz
This commit is contained in:
parent
e4fa0e1000
commit
16333b0c69
@ -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
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user