mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-12 07:57:22 +00:00
9ca12e9f9d
commit 5a577d970a293afe320b6c3280c10c2bd8a1ff50 Merge:908b075
96941b3
Author: ridiculousfish <corydoras@ridiculousfish.com> Date: Sat Jun 1 22:59:16 2013 -0700 Merge branch 'dotdir-two-chars' of git://github.com/GlitchMr/fish-shell into GlitchMr-dotdir-two-chars commit96941b3a92
Author: Konrad Borowski <glitchmr@myopera.com> Date: Sat May 25 09:55:43 2013 +0200 Support BSD sed commit60652c2bd2
Author: Konrad Borowski <glitchmr@myopera.com> Date: Sun May 19 10:58:40 2013 +0200 Show first two characters for dotdirs. Fixes #754.
9 lines
393 B
Fish
9 lines
393 B
Fish
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
|
|
function prompt_pwd --description "Print the current working directory, shortend to fit the prompt"
|
|
echo $PWD | sed -e "s|^$HOME|~|" -e 's-\([^/.]\)[^/]*/-\1/-g'
|
|
end
|
|
end
|