File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ getPaneDir() {
1616}
1717
1818main () {
19- path=$( getPaneDir)
19+ path=" $( getPaneDir) "
2020
2121 if [[ " $path " == " $HOME " ]]; then
2222 echo " ~"
@@ -27,7 +27,7 @@ main() {
2727 cwd=" ${path/ " ${HOME} /" / ' ~/' } "
2828
2929 # check max number of subdirs to display. 0 means unlimited
30- cwd_max_dirs=$( get_tmux_option " @dracula-cwd-max-dirs" " 0" )
30+ cwd_max_dirs=" $( get_tmux_option " @dracula-cwd-max-dirs" " 0" ) "
3131
3232 if [[ " $cwd_max_dirs " -gt 0 ]]; then
3333 base_to_erase=$cwd
@@ -40,6 +40,11 @@ main() {
4040 fi
4141 fi
4242
43+ cwd_max_chars=" $( get_tmux_option " @dracula-cwd-max-chars" " 0" ) "
44+ if [[ " ${# cwd} " -gt " $cwd_max_chars " ]]; then
45+ cwd=" …/…${cwd: (- cwd_max_chars)} "
46+ fi
47+
4348 echo " $cwd "
4449}
4550
You can’t perform that action at this time.
0 commit comments