@@ -36,7 +36,7 @@ _arguments "${_arguments_options[@]}" \ | |||||
'--help[Prints help information]' \ | '--help[Prints help information]' \ | ||||
'-V[Prints version information]' \ | '-V[Prints version information]' \ | ||||
'--version[Prints version information]' \ | '--version[Prints version information]' \ | ||||
':name -- Name of the project. Will create a new directory with that name in the current directory:_files' \ | |||||
'::name -- Name of the project. Will create a new directory with that name in the current directory:_files' \ | |||||
&& ret=0 | && ret=0 | ||||
;; | ;; | ||||
(build) | (build) | ||||
@@ -45,6 +45,7 @@ _arguments "${_arguments_options[@]}" \ | |||||
'--base-url=[Force the base URL to be that value (default to the one in config.toml)]' \ | '--base-url=[Force the base URL to be that value (default to the one in config.toml)]' \ | ||||
'-o+[Outputs the generated site in the given path]' \ | '-o+[Outputs the generated site in the given path]' \ | ||||
'--output-dir=[Outputs the generated site in the given path]' \ | '--output-dir=[Outputs the generated site in the given path]' \ | ||||
'--drafts[Include drafts when loading the site]' \ | |||||
'-h[Prints help information]' \ | '-h[Prints help information]' \ | ||||
'--help[Prints help information]' \ | '--help[Prints help information]' \ | ||||
'-V[Prints version information]' \ | '-V[Prints version information]' \ | ||||
@@ -62,6 +63,9 @@ _arguments "${_arguments_options[@]}" \ | |||||
'-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]' \ | '--watch-only[Do not start a server, just re-build project on changes]' \ | ||||
'--drafts[Include drafts when loading the site]' \ | |||||
'-O[Open site in the default browser]' \ | |||||
'--open[Open site in the default browser]' \ | |||||
'-h[Prints help information]' \ | '-h[Prints help information]' \ | ||||
'--help[Prints help information]' \ | '--help[Prints help information]' \ | ||||
'-V[Prints version information]' \ | '-V[Prints version information]' \ | ||||
@@ -70,6 +74,7 @@ _arguments "${_arguments_options[@]}" \ | |||||
;; | ;; | ||||
(check) | (check) | ||||
_arguments "${_arguments_options[@]}" \ | _arguments "${_arguments_options[@]}" \ | ||||
'--drafts[Include drafts when loading the site]' \ | |||||
'-h[Prints help information]' \ | '-h[Prints help information]' \ | ||||
'--help[Prints help information]' \ | '--help[Prints help information]' \ | ||||
'-V[Prints version information]' \ | '-V[Prints version information]' \ | ||||
@@ -45,6 +45,7 @@ Register-ArgumentCompleter -Native -CommandName 'zola' -ScriptBlock { | |||||
[CompletionResult]::new('--base-url', 'base-url', [CompletionResultType]::ParameterName, 'Force the base URL to be that value (default to the one in config.toml)') | [CompletionResult]::new('--base-url', 'base-url', [CompletionResultType]::ParameterName, 'Force the base URL to be that value (default to the one in config.toml)') | ||||
[CompletionResult]::new('-o', 'o', [CompletionResultType]::ParameterName, 'Outputs the generated site in the given path') | [CompletionResult]::new('-o', 'o', [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('--output-dir', 'output-dir', [CompletionResultType]::ParameterName, 'Outputs the generated site in the given path') | ||||
[CompletionResult]::new('--drafts', 'drafts', [CompletionResultType]::ParameterName, 'Include drafts when loading the site') | |||||
[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') | ||||
@@ -61,6 +62,9 @@ Register-ArgumentCompleter -Native -CommandName 'zola' -ScriptBlock { | |||||
[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('--watch-only', 'watch-only', [CompletionResultType]::ParameterName, 'Do not start a server, just re-build project on changes') | ||||
[CompletionResult]::new('--drafts', 'drafts', [CompletionResultType]::ParameterName, 'Include drafts when loading the site') | |||||
[CompletionResult]::new('-O', 'O', [CompletionResultType]::ParameterName, 'Open site in the default browser') | |||||
[CompletionResult]::new('--open', 'open', [CompletionResultType]::ParameterName, 'Open site in the default browser') | |||||
[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') | ||||
@@ -68,6 +72,7 @@ Register-ArgumentCompleter -Native -CommandName 'zola' -ScriptBlock { | |||||
break | break | ||||
} | } | ||||
'zola;check' { | 'zola;check' { | ||||
[CompletionResult]::new('--drafts', 'drafts', [CompletionResultType]::ParameterName, 'Include drafts when loading the site') | |||||
[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') | ||||
@@ -59,7 +59,7 @@ _zola() { | |||||
;; | ;; | ||||
zola__build) | zola__build) | ||||
opts=" -h -V -u -o --help --version --base-url --output-dir " | |||||
opts=" -h -V -u -o --drafts --help --version --base-url --output-dir " | |||||
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 | ||||
@@ -90,7 +90,7 @@ _zola() { | |||||
return 0 | return 0 | ||||
;; | ;; | ||||
zola__check) | zola__check) | ||||
opts=" -h -V --help --version " | |||||
opts=" -h -V --drafts --help --version " | |||||
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 | ||||
@@ -135,7 +135,7 @@ _zola() { | |||||
return 0 | return 0 | ||||
;; | ;; | ||||
zola__serve) | zola__serve) | ||||
opts=" -h -V -i -p -o -u --watch-only --help --version --interface --port --output-dir --base-url " | |||||
opts=" -O -h -V -i -p -o -u --watch-only --drafts --open --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 | ||||
@@ -10,6 +10,7 @@ complete -c zola -n "__fish_seen_subcommand_from init" -s h -l help -d 'Prints h | |||||
complete -c zola -n "__fish_seen_subcommand_from init" -s V -l version -d 'Prints version information' | complete -c zola -n "__fish_seen_subcommand_from init" -s V -l version -d 'Prints version information' | ||||
complete -c zola -n "__fish_seen_subcommand_from build" -s u -l base-url -d 'Force the base URL to be that value (default to the one in config.toml)' | complete -c zola -n "__fish_seen_subcommand_from build" -s u -l base-url -d 'Force the base URL to be that value (default to the one in config.toml)' | ||||
complete -c zola -n "__fish_seen_subcommand_from build" -s o -l output-dir -d 'Outputs the generated site in the given path' | complete -c zola -n "__fish_seen_subcommand_from build" -s o -l output-dir -d 'Outputs the generated site in the given path' | ||||
complete -c zola -n "__fish_seen_subcommand_from build" -l drafts -d 'Include drafts when loading the site' | |||||
complete -c zola -n "__fish_seen_subcommand_from build" -s h -l help -d 'Prints help information' | complete -c zola -n "__fish_seen_subcommand_from build" -s h -l help -d 'Prints help information' | ||||
complete -c zola -n "__fish_seen_subcommand_from build" -s V -l version -d 'Prints version information' | complete -c zola -n "__fish_seen_subcommand_from build" -s V -l version -d 'Prints version information' | ||||
complete -c zola -n "__fish_seen_subcommand_from serve" -s i -l interface -d 'Interface to bind on' | complete -c zola -n "__fish_seen_subcommand_from serve" -s i -l interface -d 'Interface to bind on' | ||||
@@ -17,8 +18,11 @@ complete -c zola -n "__fish_seen_subcommand_from serve" -s p -l port -d 'Which p | |||||
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" -l watch-only -d 'Do not start a server, just re-build project on changes' | ||||
complete -c zola -n "__fish_seen_subcommand_from serve" -l drafts -d 'Include drafts when loading the site' | |||||
complete -c zola -n "__fish_seen_subcommand_from serve" -s O -l open -d 'Open site in the default browser' | |||||
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 check" -l drafts -d 'Include drafts when loading the site' | |||||
complete -c zola -n "__fish_seen_subcommand_from check" -s h -l help -d 'Prints help information' | complete -c zola -n "__fish_seen_subcommand_from check" -s h -l help -d 'Prints help information' | ||||
complete -c zola -n "__fish_seen_subcommand_from check" -s V -l version -d 'Prints version information' | complete -c zola -n "__fish_seen_subcommand_from check" -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' | ||||