File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ extend_key() {
30
30
fi
31
31
# We save the previous mapping to a file in order to be able to recover
32
32
# the previous mapping when we unbind
33
- tmux list-keys -T $( tmux_copy_mode_string) | $AWK_CMD ' $4 == "' $key ' "' >> /tmp/copycat_$( whoami) _recover_keys
33
+ tmux list-keys -T $( tmux_copy_mode_string) | $AWK_CMD ' $4 == "' $key ' "' >> " ${TMPDIR :- / tmp} /copycat_$( whoami) _recover_keys"
34
34
tmux bind-key -T $( tmux_copy_mode_string) " $key " run-shell " tmux $cmd ; $script ; true"
35
35
}
36
36
Original file line number Diff line number Diff line change @@ -18,10 +18,10 @@ unbind_prev_next_bindings() {
18
18
}
19
19
20
20
unbind_all_bindings () {
21
- grep -v copycat < /tmp/copycat_$( whoami) _recover_keys | while read key_cmd; do
21
+ grep -v copycat < " ${TMPDIR :- / tmp} /copycat_$( whoami) _recover_keys" | while read key_cmd; do
22
22
sh -c " tmux $key_cmd "
23
23
done < /dev/stdin
24
- rm /tmp/copycat_$( whoami) _recover_keys
24
+ rm " ${TMPDIR :- / tmp} /copycat_$( whoami) _recover_keys"
25
25
}
26
26
27
27
main () {
You can’t perform that action at this time.
0 commit comments