Support BSD sed

This commit is contained in:
Konrad Borowski 2013-05-25 09:55:43 +02:00
parent 60652c2bd2
commit 96941b3a92

View file

@ -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