Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/13555.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix bash completion when the ``$IFS`` variable has been modified from its default.
3 changes: 2 additions & 1 deletion src/pip/_internal/commands/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
"bash": """
_pip_completion()
{{
local IFS=$' \\t\\n'
COMPREPLY=( $( COMP_WORDS="${{COMP_WORDS[*]}}" \\
COMP_CWORD=$COMP_CWORD \\
PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) )
PIP_AUTO_COMPLETE=1 "$1" 2>/dev/null ) )
}}
complete -o default -F _pip_completion {prog}
""",
Expand Down
3 changes: 2 additions & 1 deletion tests/functional/test_completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@
"""\
_pip_completion()
{
local IFS=$' \\t\\n'
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\
COMP_CWORD=$COMP_CWORD \\
PIP_AUTO_COMPLETE=1 $1 2>/dev/null ) )
PIP_AUTO_COMPLETE=1 "$1" 2>/dev/null ) )
}
complete -o default -F _pip_completion pip""",
),
Expand Down
Loading