2013-08-16 18:47:04 +00:00
|
|
|
switch (uname)
|
|
|
|
case Darwin
|
2013-09-12 09:06:45 +00:00
|
|
|
function prompt_pwd --description "Print the current working directory, shortened to fit the prompt"
|
2013-06-02 06:02:13 +00:00
|
|
|
echo $PWD | sed -e "s|^$HOME|~|" -e 's|^/private||' -e 's-\([^/.]\)[^/]*/-\1/-g'
|
2006-02-12 13:14:21 +00:00
|
|
|
end
|
2013-08-16 18:47:04 +00:00
|
|
|
case 'CYGWIN_*'
|
2013-09-12 09:06:45 +00:00
|
|
|
function prompt_pwd --description "Print the current working directory, shortened to fit the prompt"
|
2013-08-14 09:11:09 +00:00
|
|
|
echo $PWD | sed -e "s|^$HOME|~|" -e 's|^/cygdrive/\(.\)|\1/:|' -e 's-\([^/.]\)[^/]*/-\1/-g' -e 's-^\([^/]\)/:/\?-\u\1:/-'
|
|
|
|
end
|
2013-08-16 18:47:04 +00:00
|
|
|
case '*'
|
2013-09-12 09:06:45 +00:00
|
|
|
function prompt_pwd --description "Print the current working directory, shortened to fit the prompt"
|
2013-06-02 06:02:13 +00:00
|
|
|
echo $PWD | sed -e "s|^$HOME|~|" -e 's-\([^/.]\)[^/]*/-\1/-g'
|
2006-02-12 13:14:21 +00:00
|
|
|
end
|
|
|
|
end
|