tmux-send-text can take 1 parameter now.
This commit is contained in:
parent
b60ed6ca53
commit
9e0fb5da5f
|
@ -50,9 +50,15 @@ define-command tmux-repl-window -params 0..1 -command-completion -docstring "Cre
|
|||
tmux-repl-impl 'new-window' %arg{@}
|
||||
}
|
||||
|
||||
define-command -hidden tmux-send-text -docstring "Send the selected text to the repl pane" %{
|
||||
define-command -hidden tmux-send-text -params 0..1 -docstring "Send the selected text to the repl pane if no parameter.
|
||||
Otherwise send parameter with new line" %{
|
||||
nop %sh{
|
||||
tmux set-buffer -b kak_selection "${kak_selection}"
|
||||
if [ $# -eq 0 ]; then
|
||||
tmux set-buffer -b kak_selection "${kak_selection}"
|
||||
else
|
||||
tmux set-buffer -b kak_selection "$1
|
||||
"
|
||||
fi
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user