From 179c6d20ef8f10fd4dcc1be57e05ed4b02e8c123 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sun, 7 Jan 2024 01:48:10 +0900 Subject: [PATCH] fix(bash): prevent input to be interpreted as options for blesh auto-complete (#1511) Apply the change for zsh-autosuggestions in https://github.com/atuinsh/atuin/pull/1506 to the code for blesh auto-complete. --- atuin/src/shell/atuin.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/atuin/src/shell/atuin.bash b/atuin/src/shell/atuin.bash index ff34aea8..295ef268 100644 --- a/atuin/src/shell/atuin.bash +++ b/atuin/src/shell/atuin.bash @@ -153,7 +153,7 @@ if [[ -n "${BLE_VERSION-}" ]] && ((_ble_version >= 400)); then # function ble/complete/auto-complete/source:atuin-history { local suggestion - suggestion=$(atuin search --cmd-only --limit 1 --search-mode prefix "$_ble_edit_str") + suggestion=$(atuin search --cmd-only --limit 1 --search-mode prefix -- "$_ble_edit_str") [[ $suggestion == "$_ble_edit_str"?* ]] || return 1 ble/complete/auto-complete/enter h 0 "${suggestion:${#_ble_edit_str}}" '' "$suggestion" }