mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 14:03:58 +00:00
PWD Tweaks
Tweaked prompt_pwd and pwd to omit the leading /private from some system directories on OS X. darcs-hash:20060205194908-494f2-936d1346a4cd118f763bea24495edf9829b59748.gz
This commit is contained in:
parent
749c44fe27
commit
d8382acc74
1 changed files with 2 additions and 2 deletions
|
@ -186,7 +186,7 @@ end
|
|||
|
||||
function prompt_pwd -d "Print the current working directory, shortend to fit the prompt"
|
||||
if test "$PWD" != "$HOME"
|
||||
printf "%s" (echo $PWD|sed -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
|
||||
printf "%s" (echo $PWD|sed -e 's|/private||' -e "s|^$HOME|~|" -e 's-/\([^/]\)\([^/]*\)-/\1-g')
|
||||
echo $PWD|sed -e 's-.*/[^/]\([^/]*$\)-\1-'
|
||||
else
|
||||
echo '~'
|
||||
|
@ -198,7 +198,7 @@ end
|
|||
#
|
||||
|
||||
function pwd -d "Print working directory"
|
||||
command pwd | sed -e "s|^$HOME|~|"
|
||||
command pwd | sed -e 's|/private||' -e "s|^$HOME|~|"
|
||||
end
|
||||
|
||||
#
|
||||
|
|
Loading…
Reference in a new issue