_ncspot0000644000175000001440000000542614572567575012406 0ustar pghvlaansusers#compdef ncspot autoload -U is-at-least _ncspot() { typeset -A opt_args typeset -a _arguments_options local ret=1 if is-at-least 5.2; then _arguments_options=(-s -S -C) else _arguments_options=(-s -C) fi local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ '-d+[Enable debug logging to the specified file]:FILE:_files' \ '--debug=[Enable debug logging to the specified file]:FILE:_files' \ '-b+[custom basepath to config/cache files]:PATH:_files' \ '--basepath=[custom basepath to config/cache files]:PATH:_files' \ '-c+[Filename of config file in basepath]:FILE: ' \ '--config=[Filename of config file in basepath]:FILE: ' \ '-h[Print help]' \ '--help[Print help]' \ '-V[Print version]' \ '--version[Print version]' \ ":: :_ncspot_commands" \ "*::: :->ncspot" \ && ret=0 case $state in (ncspot) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:ncspot-command-$line[1]:" case $line[1] in (info) _arguments "${_arguments_options[@]}" \ '-h[Print help]' \ '--help[Print help]' \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" \ ":: :_ncspot__help_commands" \ "*::: :->help" \ && ret=0 case $state in (help) words=($line[1] "${words[@]}") (( CURRENT += 1 )) curcontext="${curcontext%:*:*}:ncspot-help-command-$line[1]:" case $line[1] in (info) _arguments "${_arguments_options[@]}" \ && ret=0 ;; (help) _arguments "${_arguments_options[@]}" \ && ret=0 ;; esac ;; esac ;; esac ;; esac } (( $+functions[_ncspot_commands] )) || _ncspot_commands() { local commands; commands=( 'info:Print platform information like paths' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'ncspot commands' commands "$@" } (( $+functions[_ncspot__help_commands] )) || _ncspot__help_commands() { local commands; commands=( 'info:Print platform information like paths' \ 'help:Print this message or the help of the given subcommand(s)' \ ) _describe -t commands 'ncspot help commands' commands "$@" } (( $+functions[_ncspot__help__help_commands] )) || _ncspot__help__help_commands() { local commands; commands=() _describe -t commands 'ncspot help help commands' commands "$@" } (( $+functions[_ncspot__help__info_commands] )) || _ncspot__help__info_commands() { local commands; commands=() _describe -t commands 'ncspot help info commands' commands "$@" } (( $+functions[_ncspot__info_commands] )) || _ncspot__info_commands() { local commands; commands=() _describe -t commands 'ncspot info commands' commands "$@" } if [ "$funcstack[1]" = "_ncspot" ]; then _ncspot "$@" else compdef _ncspot ncspot fi _ncspot.ps10000644000175000001440000000616314572567575013107 0ustar pghvlaansusers using namespace System.Management.Automation using namespace System.Management.Automation.Language Register-ArgumentCompleter -Native -CommandName 'ncspot' -ScriptBlock { param($wordToComplete, $commandAst, $cursorPosition) $commandElements = $commandAst.CommandElements $command = @( 'ncspot' for ($i = 1; $i -lt $commandElements.Count; $i++) { $element = $commandElements[$i] if ($element -isnot [StringConstantExpressionAst] -or $element.StringConstantType -ne [StringConstantType]::BareWord -or $element.Value.StartsWith('-') -or $element.Value -eq $wordToComplete) { break } $element.Value }) -join ';' $completions = @(switch ($command) { 'ncspot' { [CompletionResult]::new('-d', 'd', [CompletionResultType]::ParameterName, 'Enable debug logging to the specified file') [CompletionResult]::new('--debug', 'debug', [CompletionResultType]::ParameterName, 'Enable debug logging to the specified file') [CompletionResult]::new('-b', 'b', [CompletionResultType]::ParameterName, 'custom basepath to config/cache files') [CompletionResult]::new('--basepath', 'basepath', [CompletionResultType]::ParameterName, 'custom basepath to config/cache files') [CompletionResult]::new('-c', 'c', [CompletionResultType]::ParameterName, 'Filename of config file in basepath') [CompletionResult]::new('--config', 'config', [CompletionResultType]::ParameterName, 'Filename of config file in basepath') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') [CompletionResult]::new('-V', 'V ', [CompletionResultType]::ParameterName, 'Print version') [CompletionResult]::new('--version', 'version', [CompletionResultType]::ParameterName, 'Print version') [CompletionResult]::new('info', 'info', [CompletionResultType]::ParameterValue, 'Print platform information like paths') [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') break } 'ncspot;info' { [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help') break } 'ncspot;help' { [CompletionResult]::new('info', 'info', [CompletionResultType]::ParameterValue, 'Print platform information like paths') [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)') break } 'ncspot;help;info' { break } 'ncspot;help;help' { break } }) $completions.Where{ $_.CompletionText -like "$wordToComplete*" } | Sort-Object -Property ListItemText } ncspot.10000644000175000001440000000177614572567573012410 0ustar pghvlaansusers.ie \n(.g .ds Aq \(aq .el .ds Aq ' .TH ncspot 1 "ncspot 1.1.0" .SH NAME ncspot \- cross\-platform ncurses Spotify client .SH SYNOPSIS \fBncspot\fR [\fB\-d\fR|\fB\-\-debug\fR] [\fB\-b\fR|\fB\-\-basepath\fR] [\fB\-c\fR|\fB\-\-config\fR] [\fB\-h\fR|\fB\-\-help\fR] [\fB\-V\fR|\fB\-\-version\fR] [\fIsubcommands\fR] .SH DESCRIPTION cross\-platform ncurses Spotify client .SH OPTIONS .TP \fB\-d\fR, \fB\-\-debug\fR=\fIFILE\fR Enable debug logging to the specified file .TP \fB\-b\fR, \fB\-\-basepath\fR=\fIPATH\fR custom basepath to config/cache files .TP \fB\-c\fR, \fB\-\-config\fR=\fIFILE\fR [default: config.toml] Filename of config file in basepath .TP \fB\-h\fR, \fB\-\-help\fR Print help .TP \fB\-V\fR, \fB\-\-version\fR Print version .SH SUBCOMMANDS .TP ncspot\-info(1) Print platform information like paths .TP ncspot\-help(1) Print this message or the help of the given subcommand(s) .SH EXTRA Audio backends: pipe, subprocess .SH VERSION v1.1.0 .SH AUTHORS Henrik Friedrichsen and contributors ncspot.bash0000644000175000001440000000763114572567575013163 0ustar pghvlaansusers_ncspot() { local i cur prev opts cmd COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" cmd="" opts="" for i in ${COMP_WORDS[@]} do case "${cmd},${i}" in ",$1") cmd="ncspot" ;; ncspot,help) cmd="ncspot__help" ;; ncspot,info) cmd="ncspot__info" ;; ncspot__help,help) cmd="ncspot__help__help" ;; ncspot__help,info) cmd="ncspot__help__info" ;; *) ;; esac done case "${cmd}" in ncspot) opts="-d -b -c -h -V --debug --basepath --config --help --version info help" if [[ ${cur} == -* || ${COMP_CWORD} -eq 1 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in --debug) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -d) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --basepath) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -b) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; --config) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; -c) COMPREPLY=($(compgen -f "${cur}")) return 0 ;; *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; ncspot__help) opts="info help" 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 ;; ncspot__help__help) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; ncspot__help__info) opts="" if [[ ${cur} == -* || ${COMP_CWORD} -eq 3 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 fi case "${prev}" in *) COMPREPLY=() ;; esac COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 ;; ncspot__info) opts="-h --help" 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 ;; esac } if [[ "${BASH_VERSINFO[0]}" -eq 4 && "${BASH_VERSINFO[1]}" -ge 4 || "${BASH_VERSINFO[0]}" -gt 4 ]]; then complete -F _ncspot -o nosort -o bashdefault -o default ncspot else complete -F _ncspot -o bashdefault -o default ncspot fi ncspot.fish0000644000175000001440000000227314572567575013174 0ustar pghvlaansuserscomplete -c ncspot -n "__fish_use_subcommand" -s d -l debug -d 'Enable debug logging to the specified file' -r -F complete -c ncspot -n "__fish_use_subcommand" -s b -l basepath -d 'custom basepath to config/cache files' -r -F complete -c ncspot -n "__fish_use_subcommand" -s c -l config -d 'Filename of config file in basepath' -r complete -c ncspot -n "__fish_use_subcommand" -s h -l help -d 'Print help' complete -c ncspot -n "__fish_use_subcommand" -s V -l version -d 'Print version' complete -c ncspot -n "__fish_use_subcommand" -f -a "info" -d 'Print platform information like paths' complete -c ncspot -n "__fish_use_subcommand" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' complete -c ncspot -n "__fish_seen_subcommand_from info" -s h -l help -d 'Print help' complete -c ncspot -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from info; and not __fish_seen_subcommand_from help" -f -a "info" -d 'Print platform information like paths' complete -c ncspot -n "__fish_seen_subcommand_from help; and not __fish_seen_subcommand_from info; and not __fish_seen_subcommand_from help" -f -a "help" -d 'Print this message or the help of the given subcommand(s)' ncspot.elv0000644000175000001440000000304714572567575013031 0ustar pghvlaansusers use builtin; use str; set edit:completion:arg-completer[ncspot] = {|@words| fn spaces {|n| builtin:repeat $n ' ' | str:join '' } fn cand {|text desc| edit:complex-candidate $text &display=$text' '(spaces (- 14 (wcswidth $text)))$desc } var command = 'ncspot' for word $words[1..-1] { if (str:has-prefix $word '-') { break } set command = $command';'$word } var completions = [ &'ncspot'= { cand -d 'Enable debug logging to the specified file' cand --debug 'Enable debug logging to the specified file' cand -b 'custom basepath to config/cache files' cand --basepath 'custom basepath to config/cache files' cand -c 'Filename of config file in basepath' cand --config 'Filename of config file in basepath' cand -h 'Print help' cand --help 'Print help' cand -V 'Print version' cand --version 'Print version' cand info 'Print platform information like paths' cand help 'Print this message or the help of the given subcommand(s)' } &'ncspot;info'= { cand -h 'Print help' cand --help 'Print help' } &'ncspot;help'= { cand info 'Print platform information like paths' cand help 'Print this message or the help of the given subcommand(s)' } &'ncspot;help;info'= { } &'ncspot;help;help'= { } ] $completions[$command] }