Skip to content

Commit 72ba077

Browse files
Merge pull request #386 from ethancedwards8/fix-cwd-macos
remove bashism that breaks cwd on macos
2 parents f385531 + 00062b5 commit 72ba077

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/cwd.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,9 @@ main() {
2424
fi
2525

2626
# change '/home/user' to '~'
27-
cwd="${path/${HOME}/~}"
28-
27+
cwd="${path#"$HOME"}"
28+
cwd="~${cwd}"
29+
2930
# check max number of subdirs to display. 0 means unlimited
3031
cwd_max_dirs="$(get_tmux_option "@dracula-cwd-max-dirs" "0")"
3132

0 commit comments

Comments
 (0)