Skip to content

Commit

Permalink
Set IFS as local variable to prevent changing global env var
Browse files Browse the repository at this point in the history
  • Loading branch information
alexiswl committed Nov 20, 2022
1 parent 654a702 commit 73d04a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/App/Spec/Completion/Bash.pm
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ $completion_outer
_${appname}_compreply() \{
local prefix=""
local IFS=\$'\\n'
cur="\$(printf '%q' "\$cur")"
IFS=\$'\\n' COMPREPLY=(\$(compgen -P "\$prefix" -W "\$*" -- "\$cur"))
IFS=\$IFS COMPREPLY=(\$(compgen -P "\$prefix" -W "\$*" -- "\$cur"))
__ltrim_colon_completions "\$prefix\$cur"
# http://stackoverflow.com/questions/7267185/bash-autocompletion-add-description-for-possible-completions
Expand Down

0 comments on commit 73d04a5

Please sign in to comment.