mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 21:44:16 +00:00
Show drive letter under Cygwin
/c/c looks awful, and C:/ is simply better.
This commit is contained in:
parent
8ab81e6d4b
commit
feb36e7342
1 changed files with 4 additions and 0 deletions
|
@ -2,6 +2,10 @@ 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'
|
||||
end
|
||||
else if test (uname -o) = Cygwin
|
||||
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
|
||||
echo $PWD | sed -e "s|^$HOME|~|" -e 's|^/cygdrive/\(.\)|\1/:|' -e 's-\([^/.]\)[^/]*/-\1/-g' -e 's-^\([^/]\)/:/\?-\u\1:/-'
|
||||
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'
|
||||
|
|
Loading…
Reference in a new issue