Add doc comments to path flag for add-alias and remove-alias commands
This commit is contained in:
parent
84d1d830f9
commit
88aac1850f
|
|
@ -41,8 +41,8 @@ _arguments "${_arguments_options[@]}" : \
|
|||
;;
|
||||
(add-alias)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'-p+[]:PATH:_files -/' \
|
||||
'--path=[]:PATH:_files -/' \
|
||||
'-p+[Path to add aliases to]:PATH:_files -/' \
|
||||
'--path=[Path to add aliases to]:PATH:_files -/' \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
'-V[Print version]' \
|
||||
|
|
@ -223,8 +223,8 @@ _arguments "${_arguments_options[@]}" : \
|
|||
;;
|
||||
(remove-alias)
|
||||
_arguments "${_arguments_options[@]}" : \
|
||||
'-p+[]:PATH:_files -/' \
|
||||
'--path=[]:PATH:_files -/' \
|
||||
'-p+[Path to remove aliases from]:PATH:_files -/' \
|
||||
'--path=[Path to remove aliases from]:PATH:_files -/' \
|
||||
'-h[Print help]' \
|
||||
'--help[Print help]' \
|
||||
'-V[Print version]' \
|
||||
|
|
|
|||
|
|
@ -45,8 +45,8 @@ Register-ArgumentCompleter -Native -CommandName 'zoxide' -ScriptBlock {
|
|||
break
|
||||
}
|
||||
'zoxide;add-alias' {
|
||||
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'p')
|
||||
[CompletionResult]::new('--path', '--path', [CompletionResultType]::ParameterName, 'path')
|
||||
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Path to add aliases to')
|
||||
[CompletionResult]::new('--path', '--path', [CompletionResultType]::ParameterName, 'Path to add aliases to')
|
||||
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
|
||||
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
|
||||
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version')
|
||||
|
|
@ -190,8 +190,8 @@ Register-ArgumentCompleter -Native -CommandName 'zoxide' -ScriptBlock {
|
|||
break
|
||||
}
|
||||
'zoxide;remove-alias' {
|
||||
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'p')
|
||||
[CompletionResult]::new('--path', '--path', [CompletionResultType]::ParameterName, 'path')
|
||||
[CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'Path to remove aliases from')
|
||||
[CompletionResult]::new('--path', '--path', [CompletionResultType]::ParameterName, 'Path to remove aliases from')
|
||||
[CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
|
||||
[CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
|
||||
[CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version')
|
||||
|
|
|
|||
|
|
@ -40,8 +40,8 @@ set edit:completion:arg-completer[zoxide] = {|@words|
|
|||
cand --version 'Print version'
|
||||
}
|
||||
&'zoxide;add-alias'= {
|
||||
cand -p 'p'
|
||||
cand --path 'path'
|
||||
cand -p 'Path to add aliases to'
|
||||
cand --path 'Path to add aliases to'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
cand -V 'Print version'
|
||||
|
|
@ -169,8 +169,8 @@ set edit:completion:arg-completer[zoxide] = {|@words|
|
|||
cand --version 'Print version'
|
||||
}
|
||||
&'zoxide;remove-alias'= {
|
||||
cand -p 'p'
|
||||
cand --path 'path'
|
||||
cand -p 'Path to remove aliases from'
|
||||
cand --path 'Path to remove aliases from'
|
||||
cand -h 'Print help'
|
||||
cand --help 'Print help'
|
||||
cand -V 'Print version'
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ complete -c zoxide -n "__fish_zoxide_needs_command" -f -a "remove-alias" -d 'Rem
|
|||
complete -c zoxide -n "__fish_zoxide_using_subcommand add" -s s -l score -d 'The rank to increment the entry if it exists or initialize it with if it doesn\'t' -r
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand add" -s h -l help -d 'Print help'
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand add" -s V -l version -d 'Print version'
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand add-alias" -s p -l path -r -f -a "(__fish_complete_directories)"
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand add-alias" -s p -l path -d 'Path to add aliases to' -r -f -a "(__fish_complete_directories)"
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand add-alias" -s h -l help -d 'Print help'
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand add-alias" -s V -l version -d 'Print version'
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand edit; and not __fish_seen_subcommand_from decrement delete increment reload" -s h -l help -d 'Print help'
|
||||
|
|
@ -99,6 +99,6 @@ complete -c zoxide -n "__fish_zoxide_using_subcommand query" -s h -l help -d 'Pr
|
|||
complete -c zoxide -n "__fish_zoxide_using_subcommand query" -s V -l version -d 'Print version'
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand remove" -s h -l help -d 'Print help'
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand remove" -s V -l version -d 'Print version'
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand remove-alias" -s p -l path -r -f -a "(__fish_complete_directories)"
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand remove-alias" -s p -l path -d 'Path to remove aliases from' -r -f -a "(__fish_complete_directories)"
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand remove-alias" -s h -l help -d 'Print help'
|
||||
complete -c zoxide -n "__fish_zoxide_using_subcommand remove-alias" -s V -l version -d 'Print version'
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ module completions {
|
|||
|
||||
# Add aliases for a directory
|
||||
export extern "zoxide add-alias" [
|
||||
--path(-p): path
|
||||
--path(-p): path # Path to add aliases to
|
||||
--help(-h) # Print help
|
||||
--version(-V) # Print version
|
||||
...aliases: string
|
||||
|
|
@ -141,7 +141,7 @@ module completions {
|
|||
|
||||
# Remove aliases from a directory
|
||||
export extern "zoxide remove-alias" [
|
||||
--path(-p): path
|
||||
--path(-p): path # Path to remove aliases from
|
||||
--help(-h) # Print help
|
||||
--version(-V) # Print version
|
||||
...aliases: string
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ const completion: Fig.Spec = {
|
|||
options: [
|
||||
{
|
||||
name: ["-p", "--path"],
|
||||
description: "Path to add aliases to",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "path",
|
||||
|
|
@ -413,6 +414,7 @@ const completion: Fig.Spec = {
|
|||
options: [
|
||||
{
|
||||
name: ["-p", "--path"],
|
||||
description: "Path to remove aliases from",
|
||||
isRepeatable: true,
|
||||
args: {
|
||||
name: "path",
|
||||
|
|
|
|||
|
|
@ -77,6 +77,7 @@ pub struct AddAlias {
|
|||
#[clap(num_args = 1.., required = true)]
|
||||
pub aliases: Vec<String>,
|
||||
|
||||
/// Path to add aliases to
|
||||
#[clap(short, long, required = true, value_hint = ValueHint::DirPath)]
|
||||
pub path: PathBuf,
|
||||
}
|
||||
|
|
@ -240,6 +241,7 @@ pub struct RemoveAlias {
|
|||
#[clap(num_args = 1.., required = true)]
|
||||
pub aliases: Vec<String>,
|
||||
|
||||
/// Path to remove aliases from
|
||||
#[clap(short, long, required = true, value_hint = ValueHint::DirPath)]
|
||||
pub path: String,
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue