Skip to content

Commit

Permalink
fix(shell integration): πŸ› fix the bash shell integration (#914)
Browse files Browse the repository at this point in the history
This was adding a space when no more completion was available, but the
autocompletion command still returned a successful exit code. This is
fixed by checking if the autocompletion value is empty and skipping it
in this case.
  • Loading branch information
xaf authored Jan 24, 2025
1 parent 0140a82 commit 7cf2e25
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/shell_integration.bash.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ else
{{ OMNI_BIN }} --complete ${words[@]})

while read -r opt; do
if [[ "${opt}" != "${cur}"* ]]; then
if [[ -z "${opt}" ]] || [[ "${opt}" != "${cur}"* ]]; then
continue
fi

Expand Down

0 comments on commit 7cf2e25

Please sign in to comment.