Created
October 9, 2017 15:42
-
-
Save brynedwards/659ca7c1169ac1c7419591afd1c5f345 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def tmux-send-command -docstring "Send command to the repl pane" -params 0..1 %{ | |
nop %sh{ | |
tmux set-buffer -b kak_selection "$1" | |
kak_orig_window=$(tmux display-message -p '#I') | |
kak_orig_pane=$(tmux display-message -p '#P') | |
tmux select-window -t:$(tmux show-buffer -b kak_repl_window) | |
tmux select-pane -t:.$(tmux show-buffer -b kak_repl_pane) | |
tmux paste-buffer -b kak_selection | |
tmux send-keys Enter | |
tmux select-window -t:${kak_orig_window} | |
tmux select-pane -t:.${kak_orig_pane} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment