mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-30 14:53:11 +00: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 '//'
10 lines
392 B
Fish
10 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
|