Skip to content

Commit

Permalink
(#3381) Add tab completion for rule command
Browse files Browse the repository at this point in the history
With the addition of the new choco rule command, we need to update the
tab completion to allow usage of the command.  This includes both the
new command name itself, as well as the options that are available to
the rule.
  • Loading branch information
gep13 committed May 22, 2024
1 parent daf2659 commit a6e6f2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/chocolatey.resources/helpers/ChocolateyTabExpansion.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ function script:chocoCmdOperations($commands, $command, $filter, $currentArgumen
Where-Object { $_ -like "$filter*" }
}

$script:chocoCommands = @('-?','search','list','info','install','outdated','upgrade','uninstall','new','pack','push','-h','--help','pin','source','config','feature','apikey','export','help','template','cache','--version')
$script:chocoCommands = @('-?','search','list','info','install','outdated','upgrade','uninstall','new','pack','push','-h','--help','pin','source','config','feature','apikey','export','help','template','cache','--version','rule')

# ensure these all have a space to start, or they will cause issues
$allcommands = " --debug --verbose --trace --noop --help -? --online --accept-license --confirm --limit-output --no-progress --log-file='' --execution-timeout='' --cache-location='' --proxy='' --proxy-user='' --proxy-password='' --proxy-bypass-list='' --proxy-bypass-on-local --force --no-color --skip-compatibility-checks --ignore-http-cache"
Expand All @@ -59,6 +59,7 @@ $commandOptions = @{
export = "--include-version-numbers --output-file-path=''"
template = "--name=''"
cache = "--expired"
rule = "--name=''"
}

$commandOptions['find'] = $commandOptions['search']
Expand Down

0 comments on commit a6e6f2b

Please sign in to comment.