Skip to content

Commit

Permalink
prompt: fix expansion of \w and \W for PWD=//
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Dec 27, 2019
1 parent b2e1fce commit 3623284
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ble-edit.sh
Expand Up @@ -955,8 +955,8 @@ function .ble-line-prompt/update/backslash:w { # PWD
.ble-line-prompt/update/append "$param_wd"
}
function .ble-line-prompt/update/backslash:W { # PWD短縮
if [[ $PWD == / ]]; then
.ble-line-prompt/update/append /
if [[ ! ${PWD//'/'} ]]; then
.ble-line-prompt/update/append "$PWD"
else
.ble-line-prompt/update/append "${param_wd##*/}"
fi
Expand Down

0 comments on commit 3623284

Please sign in to comment.