mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-10-30 09:30:47 +03:00
9d15bfae99
Installs into the default site-wide Zsh directory.
23 lines
822 B
Text
23 lines
822 B
Text
#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()
|
|
{
|
|
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}
|
|
}
|
|
|
|
# Local Variables:
|
|
# mode: shell-script
|
|
# End:
|