remove the option and provide session name explictly
This commit is contained in:
parent
f33126c2a9
commit
02bc786fb7
|
@ -5,24 +5,17 @@ provide-module zellij %{
|
||||||
|
|
||||||
# ensure we're running under zellij
|
# ensure we're running under zellij
|
||||||
evaluate-commands %sh{
|
evaluate-commands %sh{
|
||||||
[ -z "${kak_opt_windowing_modules}" ] || [ -n "$ZELLIJ" ] || echo 'fail zellij not detected'
|
[ -z "${kak_opt_windowing_modules}" ] || [ -n "$ZELLIJ" -a -n "$ZELLIJ_SESSION_NAME" ] || echo 'fail zellij not detected'
|
||||||
}
|
}
|
||||||
|
|
||||||
declare-option -hidden -docstring %{zellij run options (please check out "zellij run --help" for detail)}\
|
define-command -hidden -params 2.. zellij-run %{ nop %sh{
|
||||||
str zellij_run_options ""
|
zellij_run_options=$1
|
||||||
|
shift
|
||||||
define-command -hidden -params .. zellij-run %{
|
zellij --session "$kak_client_env_ZELLIJ_SESSION_NAME" run $zellij_run_options -- "$@"
|
||||||
nop %sh{
|
}}
|
||||||
zellij run $kak_opt_zellij_run_options -- "$@"
|
|
||||||
}
|
|
||||||
set global zellij_run_options ""
|
|
||||||
unset buffer zellij_run_options
|
|
||||||
unset window zellij_run_options
|
|
||||||
}
|
|
||||||
|
|
||||||
define-command -hidden -params 1.. zellij-terminal-impl %{
|
define-command -hidden -params 1.. zellij-terminal-impl %{
|
||||||
set global zellij_run_options "--close-on-exit"
|
zellij-run "--close-on-exit" %arg{@}
|
||||||
zellij-run %arg{@}
|
|
||||||
}
|
}
|
||||||
complete-command zellij-terminal-impl shell
|
complete-command zellij-terminal-impl shell
|
||||||
|
|
||||||
|
@ -31,8 +24,7 @@ zellij-terminal-vertical <program> [<arguments>]: create a new terminal as a zel
|
||||||
The current pane is split into two, top and bottom
|
The current pane is split into two, top and bottom
|
||||||
The program passed as argument will be executed in the new terminal' \
|
The program passed as argument will be executed in the new terminal' \
|
||||||
%{
|
%{
|
||||||
set global zellij_run_options "--direction down"
|
zellij-run "--direction down" %arg{@}
|
||||||
zellij-run %arg{@}
|
|
||||||
}
|
}
|
||||||
complete-command zellij-terminal-vertical shell
|
complete-command zellij-terminal-vertical shell
|
||||||
|
|
||||||
|
@ -41,8 +33,7 @@ zellij-terminal-horizontal <program> [<arguments>]: create a new terminal as a z
|
||||||
The current pane is split into two, left and right
|
The current pane is split into two, left and right
|
||||||
The program passed as argument will be executed in the new terminal' \
|
The program passed as argument will be executed in the new terminal' \
|
||||||
%{
|
%{
|
||||||
set global zellij_run_options "--direction right"
|
zellij-run "--direction right" %arg{@}
|
||||||
zellij-run %arg{@}
|
|
||||||
}
|
}
|
||||||
complete-command zellij-terminal-horizontal shell
|
complete-command zellij-terminal-horizontal shell
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user