From 413d7a1326721ce803240fc5af299329e2afee3c Mon Sep 17 00:00:00 2001 From: zou000 Date: Sat, 16 Oct 2021 19:15:00 -0700 Subject: [PATCH] Fix home dir substitution See the discussions in https://github.com/Bash-it/bash-it/commit/953e422bed2f9b0ba01ec998fe619e523819551f#commitcomment-58148656 . Tested with bash 5.1 and bash 3.2 --- themes/powerline/powerline.base.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/powerline/powerline.base.bash b/themes/powerline/powerline.base.bash index cffaa98d..db770404 100644 --- a/themes/powerline/powerline.base.bash +++ b/themes/powerline/powerline.base.bash @@ -142,7 +142,7 @@ function __powerline_scm_prompt() { } function __powerline_cwd_prompt() { - local cwd="${PWD/$HOME/~}" + local cwd=${PWD/$HOME/\~} echo "${cwd}|${CWD_THEME_PROMPT_COLOR}" }