mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
Merge pull request #1317 from tastytea/fix-zsh-completion
update Zsh completion
This commit is contained in:
commit
d59f0768f0
1 changed files with 9 additions and 14 deletions
|
@ -1,16 +1,6 @@
|
|||
#compdef nheko
|
||||
|
||||
_arguments '--help[Displays help on commandline options.]' \
|
||||
'-h[Displays help on commandline options.]' \
|
||||
'--help-all[Displays help including Qt specific options.]' \
|
||||
'--version[Displays version information.]' \
|
||||
'-v[Displays version information.]' \
|
||||
'--debug[Enables debug output.]' \
|
||||
'--profile[Create or select profile.]:profile:_nheko_select_profile' \
|
||||
'-p[Create or select profile.]:profile:_nheko_select_profile'
|
||||
|
||||
function _nheko_select_profile()
|
||||
{
|
||||
function _nheko_select_profile() {
|
||||
local -a profiles=(default)
|
||||
while read -r line; do
|
||||
[[ ${line} =~ '\\auth\\device_id' ]] && profiles+=(${line%%\\*})
|
||||
|
@ -18,6 +8,11 @@ function _nheko_select_profile()
|
|||
_values "profile" ${profiles}
|
||||
}
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# End:
|
||||
_arguments \
|
||||
{'(--help)-h','(-h)--help'}'[Displays help on commandline options.]' \
|
||||
--help-all'[Displays help including Qt specific options.]' \
|
||||
{'(--version)-v','(-v)--version'}'[Displays version information.]' \
|
||||
--debug'[Enables debug output.]' \
|
||||
{'(--log-level)-l','(-l)--log-level'}'[Set the global log level, or a comma-separated list of <component>=<level> pairs, or both.]' \
|
||||
{'(--log-type)-L','(-L)--log-type'}"[Set the log output type. A comma-separated list is allowed. The default is 'file,stderr'.]" \
|
||||
{'(--profile)-p','(-p)--profile'}'[Create or select profile.]':'profile':'_nheko_select_profile'
|
||||
|
|
Loading…
Reference in a new issue