Rebuild completions
This commit is contained in:
parent
29b8dffe27
commit
09fa063dc6
|
@ -61,6 +61,7 @@ _arguments "${_arguments_options[@]}" \
|
||||||
'--output-dir=[Outputs the generated site in the given path]' \
|
'--output-dir=[Outputs the generated site in the given path]' \
|
||||||
'-u+[Changes the base_url]' \
|
'-u+[Changes the base_url]' \
|
||||||
'--base-url=[Changes the base_url]' \
|
'--base-url=[Changes the base_url]' \
|
||||||
|
'--watch-only[Do not start a server, just re-build project on changes]' \
|
||||||
'-h[Prints help information]' \
|
'-h[Prints help information]' \
|
||||||
'--help[Prints help information]' \
|
'--help[Prints help information]' \
|
||||||
'-V[Prints version information]' \
|
'-V[Prints version information]' \
|
||||||
|
|
|
@ -59,6 +59,7 @@ Register-ArgumentCompleter -Native -CommandName 'zola' -ScriptBlock {
|
||||||
[CompletionResult]::new('--output-dir', 'output-dir', [CompletionResultType]::ParameterName, 'Outputs the generated site in the given path')
|
[CompletionResult]::new('--output-dir', 'output-dir', [CompletionResultType]::ParameterName, 'Outputs the generated site in the given path')
|
||||||
[CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Changes the base_url')
|
[CompletionResult]::new('-u', 'u', [CompletionResultType]::ParameterName, 'Changes the base_url')
|
||||||
[CompletionResult]::new('--base-url', 'base-url', [CompletionResultType]::ParameterName, 'Changes the base_url')
|
[CompletionResult]::new('--base-url', 'base-url', [CompletionResultType]::ParameterName, 'Changes the base_url')
|
||||||
|
[CompletionResult]::new('--watch-only', 'watch-only', [CompletionResultType]::ParameterName, 'Do not start a server, just re-build project on changes')
|
||||||
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
|
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information')
|
||||||
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
|
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information')
|
||||||
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
|
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information')
|
||||||
|
|
|
@ -117,7 +117,7 @@ _zola() {
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
zola__serve)
|
zola__serve)
|
||||||
opts=" -h -V -i -p -o -u --help --version --interface --port --output-dir --base-url "
|
opts=" -h -V -i -p -o -u --watch-only --help --version --interface --port --output-dir --base-url "
|
||||||
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
|
||||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||||
return 0
|
return 0
|
||||||
|
|
|
@ -15,6 +15,7 @@ complete -c zola -n "__fish_seen_subcommand_from serve" -s i -l interface -d 'In
|
||||||
complete -c zola -n "__fish_seen_subcommand_from serve" -s p -l port -d 'Which port to use'
|
complete -c zola -n "__fish_seen_subcommand_from serve" -s p -l port -d 'Which port to use'
|
||||||
complete -c zola -n "__fish_seen_subcommand_from serve" -s o -l output-dir -d 'Outputs the generated site in the given path'
|
complete -c zola -n "__fish_seen_subcommand_from serve" -s o -l output-dir -d 'Outputs the generated site in the given path'
|
||||||
complete -c zola -n "__fish_seen_subcommand_from serve" -s u -l base-url -d 'Changes the base_url'
|
complete -c zola -n "__fish_seen_subcommand_from serve" -s u -l base-url -d 'Changes the base_url'
|
||||||
|
complete -c zola -n "__fish_seen_subcommand_from serve" -l watch-only -d 'Do not start a server, just re-build project on changes'
|
||||||
complete -c zola -n "__fish_seen_subcommand_from serve" -s h -l help -d 'Prints help information'
|
complete -c zola -n "__fish_seen_subcommand_from serve" -s h -l help -d 'Prints help information'
|
||||||
complete -c zola -n "__fish_seen_subcommand_from serve" -s V -l version -d 'Prints version information'
|
complete -c zola -n "__fish_seen_subcommand_from serve" -s V -l version -d 'Prints version information'
|
||||||
complete -c zola -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
|
complete -c zola -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'
|
||||||
|
|
Loading…
Reference in a new issue