From 012526656eb3b7000a6621f9eb753b9895cfda54 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Wed, 27 Jun 2012 21:29:29 +0100 Subject: [PATCH] Remove send-keys `-l` support check as it is not needed After some experimentation it turns out that if input to send-keys is not a known key sequence like `C-m` or `C-l` for example, it it automatically treated as literal input. Negating the need to use it and hence check if it's supported. --- lib/layout-helpers.sh | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/layout-helpers.sh b/lib/layout-helpers.sh index 3886733..b01bc0d 100644 --- a/lib/layout-helpers.sh +++ b/lib/layout-helpers.sh @@ -68,12 +68,7 @@ select_pane() { # - $2: (optional) Target pane ID to run command in. # run_cmd() { - literal_support=$(tmux send-keys -l 2&> /dev/null ; echo $?) - if [ $literal_support -eq 0 ]; then - tmux send-keys -t "$session:$window.$2" -l "$1" - else - tmux send-keys -t "$session:$window.$2" "$1" - fi + tmux send-keys -t "$session:$window.$2" "$1" tmux send-keys -t "$session:$window.$2" "C-m" }