diff options
author | a-kenji <aks.kenji@protonmail.com> | 2021-04-04 19:27:28 +0200 |
---|---|---|
committer | a-kenji <aks.kenji@protonmail.com> | 2021-04-04 19:27:28 +0200 |
commit | d9a85e977d4c81f6efcf73785b1e17175d3edc59 (patch) | |
tree | 7dc780f26d8f8ddd95119b61358496d9c8ba4cfd /assets | |
parent | ca014d7aaced18c534c5a3577906922db0a58e75 (diff) |
Readd short option for config
Diffstat (limited to 'assets')
-rw-r--r-- | assets/completions/_zellij | 36 | ||||
-rw-r--r-- | assets/completions/zellij.bash | 20 |
2 files changed, 54 insertions, 2 deletions
diff --git a/assets/completions/_zellij b/assets/completions/_zellij index 8b89db14f..fc1cd00f2 100644 --- a/assets/completions/_zellij +++ b/assets/completions/_zellij @@ -39,7 +39,27 @@ _zellij() { (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:zellij-command-$line[1]:" case $line[1] in - (config) + (c) +_arguments "${_arguments_options[@]}" \ +'--clean[Disables loading of configuration file at default location]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'::path:_files' \ +&& ret=0 +;; +(c) +_arguments "${_arguments_options[@]}" \ +'--clean[Disables loading of configuration file at default location]' \ +'-h[Prints help information]' \ +'--help[Prints help information]' \ +'-V[Prints version information]' \ +'--version[Prints version information]' \ +'::path:_files' \ +&& ret=0 +;; +(config) _arguments "${_arguments_options[@]}" \ '--clean[Disables loading of configuration file at default location]' \ '-h[Prints help information]' \ @@ -70,6 +90,20 @@ _zellij_commands() { ) _describe -t commands 'zellij commands' commands "$@" } +(( $+functions[_c_commands] )) || +_c_commands() { + local commands; commands=( + + ) + _describe -t commands 'c commands' commands "$@" +} +(( $+functions[_zellij__c_commands] )) || +_zellij__c_commands() { + local commands; commands=( + + ) + _describe -t commands 'zellij c commands' commands "$@" +} (( $+functions[_zellij__config_commands] )) || _zellij__config_commands() { local commands; commands=( diff --git a/assets/completions/zellij.bash b/assets/completions/zellij.bash index 549b1e9fb..10c18d532 100644 --- a/assets/completions/zellij.bash +++ b/assets/completions/zellij.bash @@ -13,6 +13,9 @@ _zellij() { cmd="zellij" ;; + c) + cmd+="__c" + ;; config) cmd+="__config" ;; @@ -26,7 +29,7 @@ _zellij() { case "${cmd}" in zellij) - opts=" -m -d -h -V -s -o -l --move-focus --debug --help --version --split --open-file --max-panes --layout config help" + opts=" -m -d -h -V -s -o -l --move-focus --debug --help --version --split --open-file --max-panes --layout config help c c" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -69,6 +72,21 @@ _zellij() { return 0 ;; + zellij__c) + opts=" -h -V --clean --help --version <path> " + if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + fi + case "${prev}" in + + *) + COMPREPLY=() + ;; + esac + COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) + return 0 + ;; zellij__config) opts=" -h -V --clean --help --version <path> " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then |