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 2
2
3
3
# Tests helper script for setting up `.tmux.conf` within the VM.
4
4
# To be used by sourcing from within individual test scripts.
5
+ BASE_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /../.." && pwd ) "
5
6
6
7
setup_tmux_conf () {
7
8
# Copy mode (vi or emacs) is automatically determined from EDITOR
8
9
# environment variable set in test runner file `test/run-tests-within-vm`.
9
10
if tmux_is_at_least 2.4; then
10
11
echo " bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel" > ~ /.tmux.conf
11
12
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
13
14
else
14
15
echo " bind-key -t vi-copy y copy-selection" > ~ /.tmux.conf
15
16
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
17
18
fi
18
19
}
19
20
Original file line number Diff line number Diff line change 3
3
# Tests helper script for setting up `.tmux.conf` within the VM.
4
4
# To be used by sourcing from within individual test scripts.
5
5
6
+ BASE_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /../.." && pwd ) "
7
+
6
8
setup_tmux_conf () {
7
9
# Copy mode (vi or emacs) is automatically determined from EDITOR
8
10
# environment variable set in test runner file `test/run-tests-within-vm`.
9
11
if tmux_is_at_least 2.4; then
10
12
echo " bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel" > ~ /.tmux.conf
11
13
echo " bind-key -T copy-mode y send-keys -X copy-selection-and-cancel" >> ~ /.tmux.conf
12
14
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
14
16
else
15
17
echo " bind-key -t vi-copy y copy-selection" > ~ /.tmux.conf
16
18
echo " bind-key -t emacs-copy y copy-selection" >> ~ /.tmux.conf
17
19
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
19
21
fi
20
22
}
21
23
# Cache the TMUX version for speed.
You can’t perform that action at this time.
0 commit comments