mirror of
https://github.com/fish-shell/fish-shell.git
synced 2024-11-23 13:33:02 +08:00
d07e78c59a
Remove the case statements, which were handled by the sed blocks anyway Move around the '/' character in the regex, so only one regex is needed Fix a bug where '/' is output as '//'
11 lines
392 B
Fish
11 lines
392 B
Fish
|
|
if test (uname) = Darwin
|
|
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
|
|
echo $PWD | sed -e "s|^$HOME|~|" -e 's|^/private||' -e 's-\([^/]\)[^/]*/-\1/-g'
|
|
end
|
|
else
|
|
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
|
|
echo $PWD | sed -e "s|^$HOME|~|" -e 's-\([^/]\)[^/]*/-\1/-g'
|
|
end
|
|
end
|