File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 22
33# Tests helper script for setting up `.tmux.conf` within the VM.
44# To be used by sourcing from within individual test scripts.
5+ BASE_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /../.." && pwd ) "
56
67setup_tmux_conf () {
78 # Copy mode (vi or emacs) is automatically determined from EDITOR
89 # environment variable set in test runner file `test/run-tests-within-vm`.
910 if tmux_is_at_least 2.4; then
1011 echo " bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel" > ~ /.tmux.conf
1112 echo " bind-key -T copy-mode y send-keys -X copy-selection-and-cancel" >> ~ /.tmux.conf
12- echo " run-shell '/vagrant /copycat.tmux'" >> ~ /.tmux.conf
13+ echo " run-shell '$BASE_DIR /copycat.tmux'" >> ~ /.tmux.conf
1314 else
1415 echo " bind-key -t vi-copy y copy-selection" > ~ /.tmux.conf
1516 echo " bind-key -t emacs-copy y copy-selection" >> ~ /.tmux.conf
16- echo " run-shell '/vagrant /copycat.tmux'" >> ~ /.tmux.conf
17+ echo " run-shell '$BASE_DIR /copycat.tmux'" >> ~ /.tmux.conf
1718 fi
1819}
1920
Original file line number Diff line number Diff line change 33# Tests helper script for setting up `.tmux.conf` within the VM.
44# To be used by sourcing from within individual test scripts.
55
6+ BASE_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /../.." && pwd ) "
7+
68setup_tmux_conf () {
79 # Copy mode (vi or emacs) is automatically determined from EDITOR
810 # environment variable set in test runner file `test/run-tests-within-vm`.
911 if tmux_is_at_least 2.4; then
1012 echo " bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel" > ~ /.tmux.conf
1113 echo " bind-key -T copy-mode y send-keys -X copy-selection-and-cancel" >> ~ /.tmux.conf
1214 echo " set -g @copycat_search_C-t 'random string[[:digit:]]+'" >> ~ /.tmux.conf
13- echo " run-shell '/vagrant /copycat.tmux'" >> ~ /.tmux.conf
15+ echo " run-shell '$BASE_DIR /copycat.tmux'" >> ~ /.tmux.conf
1416 else
1517 echo " bind-key -t vi-copy y copy-selection" > ~ /.tmux.conf
1618 echo " bind-key -t emacs-copy y copy-selection" >> ~ /.tmux.conf
1719 echo " set -g @copycat_search_C-t 'random string[[:digit:]]+'" >> ~ /.tmux.conf
18- echo " run-shell '/vagrant /copycat.tmux'" >> ~ /.tmux.conf
20+ echo " run-shell '$BASE_DIR /copycat.tmux'" >> ~ /.tmux.conf
1921 fi
2022}
2123# Cache the TMUX version for speed.
You can’t perform that action at this time.
0 commit comments