mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Support BSD sed
This commit is contained in:
parent
60652c2bd2
commit
96941b3a92
1 changed files with 2 additions and 3 deletions
|
@ -1,10 +1,9 @@
|
|||
|
||||
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'
|
||||
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'
|
||||
echo $PWD | sed -e "s|^$HOME|~|" -e 's-\([^/.]\)[^/]*/-\1/-g'
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue