Skip to content

Commit

Permalink
chore(integrations): Re-generate shell completion scripts
Browse files Browse the repository at this point in the history
The scripts have been updated via gradle by running e.g. [1].

[1]: `./gradlew -q :cli:run --args="--generate-completion=zsh" > integrations/completions/ort-completion.zsh`

Signed-off-by: Frank Viernau <[email protected]>
  • Loading branch information
fviernau committed Apr 4, 2024
1 parent 85ef86a commit adda3fc
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
11 changes: 10 additions & 1 deletion integrations/completions/ort-completion.bash
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,12 @@ _ort_migrate() {
[[ ${i} -gt COMP_CWORD ]] && in_param='--nuget-ids' || in_param=''
continue
;;
--pub-ids)
__skip_opt_eq
(( i = i + 1 ))
[[ ${i} -gt COMP_CWORD ]] && in_param='--pub-ids' || in_param=''
continue
;;
-h|--help)
__skip_opt_eq
in_param=''
Expand All @@ -923,7 +929,7 @@ _ort_migrate() {
done
local word="${COMP_WORDS[$COMP_CWORD]}"
if [[ "${word}" =~ ^[-] ]]; then
COMPREPLY=($(compgen -W '--hocon-to-yaml --nuget-ids -h --help' -- "${word}"))
COMPREPLY=($(compgen -W '--hocon-to-yaml --nuget-ids --pub-ids -h --help' -- "${word}"))
return
fi

Expand All @@ -939,6 +945,9 @@ _ort_migrate() {
--nuget-ids)
COMPREPLY=($(compgen -o default -- "${word}"))
;;
--pub-ids)
COMPREPLY=($(compgen -o default -- "${word}"))
;;
--help)
;;
esac
Expand Down
3 changes: 2 additions & 1 deletion integrations/completions/ort-completion.fish
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ complete -c ort -n "__fish_seen_subcommand_from advise" -s h -l help -d 'Show th
complete -c ort -f -n __fish_use_subcommand -a analyze -d 'Determine dependencies of a software project.'

## Options for analyze
complete -c ort -n "__fish_seen_subcommand_from analyze" -l input-dir -s i -r -F -d 'The project directory to analyze. As a special case, if only one package manager is enabled, this may point to a definition file for that package manager to only analyze that single project.'
complete -c ort -n "__fish_seen_subcommand_from analyze" -l input-dir -s i -r -F -d 'The project directory to analyze. May point to a definition file if only a single package manager is enabled.'
complete -c ort -n "__fish_seen_subcommand_from analyze" -l output-dir -s o -r -F -d 'The directory to write the ORT result file with analyzer results to.'
complete -c ort -n "__fish_seen_subcommand_from analyze" -l output-formats -s f -r -fa "JSON XML YAML" -d 'The list of output formats to be used for the ORT result file(s).'
complete -c ort -n "__fish_seen_subcommand_from analyze" -l repository-configuration-file -r -F -d 'A file containing the repository configuration. If set, overrides any repository configuration contained in a \'.ort.yml\' file in the repository.'
Expand Down Expand Up @@ -119,6 +119,7 @@ complete -c ort -f -n __fish_use_subcommand -a migrate -d 'Assist with migrating
## Options for migrate
complete -c ort -n "__fish_seen_subcommand_from migrate" -l hocon-to-yaml -r -F -d 'Perform a simple conversion of the given HOCON configuration file to YAML and print the result.'
complete -c ort -n "__fish_seen_subcommand_from migrate" -l nuget-ids -r -F -d 'Convert NuGet package IDs in curations and configurations to the new format that includes a namespace.'
complete -c ort -n "__fish_seen_subcommand_from migrate" -l pub-ids -r -F -d 'Convert Pub package IDs in curations and configurations to the new format that has no namespace.'
complete -c ort -n "__fish_seen_subcommand_from migrate" -s h -l help -d 'Show this message and exit'


Expand Down
15 changes: 13 additions & 2 deletions integrations/completions/ort-completion.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
# Command completion for ort
# Generated by Clikt

autoload bashcompinit
autoload -Uz compinit
compinit
autoload -Uz bashcompinit
bashcompinit

__skip_opt_eq() {
Expand Down Expand Up @@ -909,6 +911,12 @@ _ort_migrate() {
[[ ${i} -gt COMP_CWORD ]] && in_param='--nuget-ids' || in_param=''
continue
;;
--pub-ids)
__skip_opt_eq
(( i = i + 1 ))
[[ ${i} -gt COMP_CWORD ]] && in_param='--pub-ids' || in_param=''
continue
;;
-h|--help)
__skip_opt_eq
in_param=''
Expand All @@ -926,7 +934,7 @@ _ort_migrate() {
done
local word="${COMP_WORDS[$COMP_CWORD]}"
if [[ "${word}" =~ ^[-] ]]; then
COMPREPLY=($(compgen -W '--hocon-to-yaml --nuget-ids -h --help' -- "${word}"))
COMPREPLY=($(compgen -W '--hocon-to-yaml --nuget-ids --pub-ids -h --help' -- "${word}"))
return
fi

Expand All @@ -942,6 +950,9 @@ _ort_migrate() {
--nuget-ids)
COMPREPLY=($(compgen -o default -- "${word}"))
;;
--pub-ids)
COMPREPLY=($(compgen -o default -- "${word}"))
;;
--help)
;;
esac
Expand Down

0 comments on commit adda3fc

Please sign in to comment.