Skip to content

Commit 726d7fc

Browse files
author
yoshibase
committed
fix(completion): harden bash COMP_WORDBREAKS handling and test
Make the compspec tolerate unset COMP_WORDBREAKS and helper failures, and drive the integration test through the same Python entrypoint as other completion tests so the autocomplete env var matches.
1 parent 2b35d3d commit 726d7fc

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

typer/_completion_shared.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ class Shells(str, Enum):
2929
3030
local IFS=$'\n'
3131
local -a __raw
32-
__raw=( $( env COMP_WORDS="${__words[*]}" \\
33-
COMP_CWORD=$__cword \\
32+
__raw=( $( env COMP_WORDS="${__words[*]}" \
33+
COMP_CWORD=$__cword \
3434
%(autocomplete_var)s=complete_bash $1 ) ) || true
3535
3636
local __wordbreaks="$COMP_WORDBREAKS"

0 commit comments

Comments
 (0)