-workingdir option auto added to docs

This commit is contained in:
Priyanshu Verma 2022-10-03 14:54:41 +05:30
parent 8c03027923
commit 84c90f5ec8
6 changed files with 12 additions and 1 deletions

View File

@ -70,6 +70,8 @@ _arguments "${_arguments_options[@]}" \
'(-i --interactive)--list[List all matching directories]' \
'-s[Print score with results]' \
'--score[Print score with results]' \
'-w[Search only through current working directory]' \
'--workingdir[Search only through current working directory]' \
'-h[Print help information]' \
'--help[Print help information]' \
'-V[Print version information]' \

View File

@ -67,6 +67,8 @@ Register-ArgumentCompleter -Native -CommandName 'zoxide' -ScriptBlock {
[CompletionResult]::new('--list', 'list', [CompletionResultType]::ParameterName, 'List all matching directories')
[CompletionResult]::new('-s', 's', [CompletionResultType]::ParameterName, 'Print score with results')
[CompletionResult]::new('--score', 'score', [CompletionResultType]::ParameterName, 'Print score with results')
[CompletionResult]::new('-w', 'w', [CompletionResultType]::ParameterName, 'Search only through current working directory')
[CompletionResult]::new('--workingdir', 'workingdir', [CompletionResultType]::ParameterName, 'Search only through current working directory')
[CompletionResult]::new('-h', 'h', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('--help', 'help', [CompletionResultType]::ParameterName, 'Print help information')
[CompletionResult]::new('-V', 'V', [CompletionResultType]::ParameterName, 'Print version information')

View File

@ -102,7 +102,7 @@ _zoxide() {
return 0
;;
zoxide__query)
opts="-i -l -s -h -V --all --interactive --list --score --exclude --help --version <KEYWORDS>..."
opts="-i -l -s -w -h -V --all --interactive --list --score --workingdir --exclude --help --version <KEYWORDS>..."
if [[ ${cur} == -* || ${COMP_CWORD} -eq 2 ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- "${cur}") )
return 0

View File

@ -60,6 +60,8 @@ set edit:completion:arg-completer[zoxide] = {|@words|
cand --list 'List all matching directories'
cand -s 'Print score with results'
cand --score 'Print score with results'
cand -w 'Search only through current working directory'
cand --workingdir 'Search only through current working directory'
cand -h 'Print help information'
cand --help 'Print help information'
cand -V 'Print version information'

View File

@ -21,6 +21,7 @@ complete -c zoxide -n "__fish_seen_subcommand_from query" -l all -d 'Show delete
complete -c zoxide -n "__fish_seen_subcommand_from query" -s i -l interactive -d 'Use interactive selection'
complete -c zoxide -n "__fish_seen_subcommand_from query" -s l -l list -d 'List all matching directories'
complete -c zoxide -n "__fish_seen_subcommand_from query" -s s -l score -d 'Print score with results'
complete -c zoxide -n "__fish_seen_subcommand_from query" -s w -l workingdir -d 'Search only through current working directory'
complete -c zoxide -n "__fish_seen_subcommand_from query" -s h -l help -d 'Print help information'
complete -c zoxide -n "__fish_seen_subcommand_from query" -s V -l version -d 'Print version information'
complete -c zoxide -n "__fish_seen_subcommand_from remove" -s i -l interactive -d 'Use interactive selection'

View File

@ -143,6 +143,10 @@ const completion: Fig.Spec = {
name: ["-s", "--score"],
description: "Print score with results",
},
{
name: ["-w", "--workingdir"],
description: "Search only through current working directory",
},
{
name: ["-h", "--help"],
description: "Print help information",