mirror of
https://github.com/jimeh/tmuxifier.git
synced 2026-02-19 09:56:39 +00:00
Merge pull request #4 from trobrock/no-l-flag
Support tmux versions that do not have the -l flag
This commit is contained in:
@@ -68,7 +68,12 @@ select_pane() {
|
|||||||
# - $2: (optional) Target pane ID to run command in.
|
# - $2: (optional) Target pane ID to run command in.
|
||||||
#
|
#
|
||||||
run_cmd() {
|
run_cmd() {
|
||||||
tmux send-keys -t "$session:$window.$2" -l "$1"
|
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" "C-m"
|
tmux send-keys -t "$session:$window.$2" "C-m"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user