diff --git a/_nicole.compdef.zsh b/_nicole.compdef.zsh new file mode 100644 index 0000000..807bb0d --- /dev/null +++ b/_nicole.compdef.zsh @@ -0,0 +1,30 @@ +#compdef nicole +# https://zsh.sourceforge.io/Doc/Release/Completion-System.html#Completion-Functions +_lyrics-site() +{ + _values "lyrics site" \ + 'genius[use only genius.com]' \ + 'azlyrics[use only azlyrics.com]' \ + 'all[use all supported sites (default)]' +} + +_nicole() +{ + # each argument is + # n:message:action + # option[description]:message:action + # # -s allow stacking, eg -inr + _arguments -s \ + '-d[process directory]':directory:_directories \ + '-f[process file]':file:_files \ + '-r[go through directories recursively]' \ + '-s[silent]' \ + '-i[ignore history]' \ + '-n[do not write to history]' \ + '-o[overwrite if the file already has lyrics]' \ + '-t[test, only print lyrics, dont write to tags]' \ + '-h[show this]' \ + '--rm_explicit[remove the "Explicit" lyrics warning from the title tag]' \ + '--site[specify lyrics site]':lyrics-site:_lyrics-site +} +_nicole "$@"