diff --git a/share/functions/__fish_pwd.fish b/share/functions/__fish_pwd.fish index 699eee8d5..4e0dd329c 100644 --- a/share/functions/__fish_pwd.fish +++ b/share/functions/__fish_pwd.fish @@ -1,15 +1,8 @@ -switch (uname) - case 'CYGWIN_*' - function __fish_pwd --description "Show current path" - if status test-feature regex-easyesc - pwd | string replace -r '^/cygdrive/(.)?' '\U$1:' - else - # TODO: Remove this once regex-easyesc becomes the default - pwd | string replace -r '^/cygdrive/(.)?' '\\\U$1:' - end - end - case '*' - function __fish_pwd --description "Show current path" - pwd - end +function __fish_pwd --description "Show current path" + if status test-feature regex-easyesc + string replace -r '^/cygdrive/(.)?' '\U$1:' -- $PWD + else + # TODO: Remove this once regex-easyesc becomes the default + string replace -r '^/cygdrive/(.)?' '\\\U$1:' -- $PWD + end end