mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-30 11:21:15 -03:00
Support BSD sed
This commit is contained in:
@@ -1,10 +1,9 @@
|
|||||||
|
|
||||||
if test (uname) = Darwin
|
if test (uname) = Darwin
|
||||||
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
|
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
|
end
|
||||||
else
|
else
|
||||||
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
|
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
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user