Skip to content

Commit 9657142

Browse files
committed
Add bash completions for 'venv delete' command
1 parent a0132d5 commit 9657142

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/venv-cli/completions/bash/venv_completion.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ _venv() {
55
cur_word="${COMP_WORDS[COMP_CWORD]}"
66
prev_word="${COMP_WORDS[COMP_CWORD-1]}"
77

8-
_subcommands="activate clear create deactivate install lock sync"
8+
_subcommands="activate clear create deactivate delete install lock sync"
99
subcommands=( $(compgen -W "${_subcommands}" -- "${cur_word}") )
1010
help_options=( $(compgen -W "-h --help" -- "${cur_word}") )
1111

@@ -39,6 +39,11 @@ _venv() {
3939
COMPREPLY+=( ${python_versions[*]} )
4040
COMPREPLY+=( ${help_options[*]} )
4141
;;
42+
"delete")
43+
# Generate completion for help_options plus the '-y' option
44+
COMPREPLY+=( ${help_options[*]} )
45+
COMPREPLY+=( $(compgen -W "-y" -- "${cur_word}") )
46+
;;
4247
"install")
4348
# Generate completions for requirement and lock file paths
4449
COMPREPLY+=( $(compgen -f -X '!(*.txt|*.lock)' -- "${cur_word}" | sort) )

0 commit comments

Comments
 (0)