mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-25 12:38:48 +03:00
b17cc41645
- add new command line switches - prevent duplication in argument descriptions - load helper function before using it (fixes error with Zsh 5.9)
18 lines
917 B
Text
18 lines
917 B
Text
#compdef nheko
|
|
|
|
function _nheko_select_profile() {
|
|
local -a profiles=(default)
|
|
while read -r line; do
|
|
[[ ${line} =~ '\\auth\\device_id' ]] && profiles+=(${line%%\\*})
|
|
done < ${XDG_CONFIG_HOME:-~/.config}/nheko/nheko.conf
|
|
_values "profile" ${profiles}
|
|
}
|
|
|
|
_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'
|