From fb938a3eed473218e5a4fa96ac5b50b699a30045 Mon Sep 17 00:00:00 2001 From: Vincent Prouillet Date: Sun, 25 Aug 2019 19:15:12 +0200 Subject: [PATCH] Update completions --- completions/_zola | 7 ++++++- completions/_zola.ps1 | 5 +++++ completions/zola.bash | 6 +++--- completions/zola.fish | 4 ++++ 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/completions/_zola b/completions/_zola index b92cc47..3ca5a4d 100644 --- a/completions/_zola +++ b/completions/_zola @@ -36,7 +36,7 @@ _arguments "${_arguments_options[@]}" \ '--help[Prints help information]' \ '-V[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 ;; (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)]' \ '-o+[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]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ @@ -62,6 +63,9 @@ _arguments "${_arguments_options[@]}" \ '-u+[Changes the base_url]' \ '--base-url=[Changes the base_url]' \ '--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]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ @@ -70,6 +74,7 @@ _arguments "${_arguments_options[@]}" \ ;; (check) _arguments "${_arguments_options[@]}" \ +'--drafts[Include drafts when loading the site]' \ '-h[Prints help information]' \ '--help[Prints help information]' \ '-V[Prints version information]' \ diff --git a/completions/_zola.ps1 b/completions/_zola.ps1 index e10fb9d..89915d9 100644 --- a/completions/_zola.ps1 +++ b/completions/_zola.ps1 @@ -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('-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('--drafts', 'drafts', [CompletionResultType]::ParameterName, 'Include drafts when loading the site') [CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help 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('--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('--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('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') @@ -68,6 +72,7 @@ Register-ArgumentCompleter -Native -CommandName 'zola' -ScriptBlock { break } '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('--help', 'help', [CompletionResultType]::ParameterName, 'Prints help information') [CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Prints version information') diff --git a/completions/zola.bash b/completions/zola.bash index bc3ea24..dcaa073 100644 --- a/completions/zola.bash +++ b/completions/zola.bash @@ -59,7 +59,7 @@ _zola() { ;; 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 COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -90,7 +90,7 @@ _zola() { return 0 ;; zola__check) - opts=" -h -V --help --version " + opts=" -h -V --drafts --help --version " if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 @@ -135,7 +135,7 @@ _zola() { return 0 ;; 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 COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") ) return 0 diff --git a/completions/zola.fish b/completions/zola.fish index 5e8316f..cb3302e 100644 --- a/completions/zola.fish +++ b/completions/zola.fish @@ -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 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" -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 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' @@ -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 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 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 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 V -l version -d 'Prints version information' complete -c zola -n "__fish_seen_subcommand_from help" -s h -l help -d 'Prints help information'