mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 01:11:15 -03:00
Support BSD sed
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user