diff --git a/shell-completion/hledger-completion.bash b/shell-completion/hledger-completion.bash index 7c6fb4f9e..d10e717b2 100644 --- a/shell-completion/hledger-completion.bash +++ b/shell-completion/hledger-completion.bash @@ -17,9 +17,9 @@ _hledger_completion_function() { # - option processing assumes that `=` is in COMP_WORDBREAKS # - use compopt -o filenames to escape the rest COMP_WORDBREAKS=${COMP_WORDBREAKS//:} - case "$COMP_WORDBREAKS" in + case $COMP_WORDBREAKS in *=*) : ;; - *) COMP_WORDBREAKS="$COMP_WORDBREAKS=" ;; + *) COMP_WORDBREAKS=$COMP_WORDBREAKS= ;; esac compopt -o filenames diff --git a/shell-completion/hledger-completion.bash.m4 b/shell-completion/hledger-completion.bash.m4 index 7aeb4593c..a36119a59 100644 --- a/shell-completion/hledger-completion.bash.m4 +++ b/shell-completion/hledger-completion.bash.m4 @@ -17,9 +17,9 @@ _hledger_completion_function() { # - option processing assumes that `=` is in COMP_WORDBREAKS # - use compopt -o filenames to escape the rest COMP_WORDBREAKS=${COMP_WORDBREAKS//:} - case "$COMP_WORDBREAKS" in + case $COMP_WORDBREAKS in *=*) : ;; - *) COMP_WORDBREAKS="$COMP_WORDBREAKS=" ;; + *) COMP_WORDBREAKS=$COMP_WORDBREAKS= ;; esac compopt -o filenames