mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-24 03:13:34 +03:00
46 lines
1.3 KiB
Plaintext
46 lines
1.3 KiB
Plaintext
#compdef zellij
|
|
|
|
autoload -U is-at-least
|
|
|
|
_zellij() {
|
|
typeset -A opt_args
|
|
typeset -a _arguments_options
|
|
local ret=1
|
|
|
|
if is-at-least 5.2; then
|
|
_arguments_options=(-s -S -C)
|
|
else
|
|
_arguments_options=(-s -C)
|
|
fi
|
|
|
|
local context curcontext="$curcontext" state line
|
|
_arguments "${_arguments_options[@]}" \
|
|
'-s+[Send "split (direction h == horizontal / v == vertical)" to active zellij session]' \
|
|
'--split=[Send "split (direction h == horizontal / v == vertical)" to active zellij session]' \
|
|
'-o+[Send "open file in new pane" to active zellij session]' \
|
|
'--open-file=[Send "open file in new pane" to active zellij session]' \
|
|
'--max-panes=[Maximum panes on screen, caution: opening more panes will close old ones]' \
|
|
'-l+[Path to a layout yaml file]' \
|
|
'--layout=[Path to a layout yaml file]' \
|
|
'--config=[Path to the configuration yaml file]' \
|
|
'-m[Send "move focused pane" to active zellij session]' \
|
|
'--move-focus[Send "move focused pane" to active zellij session]' \
|
|
'-d[]' \
|
|
'--debug[]' \
|
|
'-h[Prints help information]' \
|
|
'--help[Prints help information]' \
|
|
'-V[Prints version information]' \
|
|
'--version[Prints version information]' \
|
|
&& ret=0
|
|
|
|
}
|
|
|
|
(( $+functions[_zellij_commands] )) ||
|
|
_zellij_commands() {
|
|
local commands; commands=(
|
|
|
|
)
|
|
_describe -t commands 'zellij commands' commands "$@"
|
|
}
|
|
|
|
_zellij "$@" |