mirror of
https://github.com/atuinsh/atuin.git
synced 2024-11-25 17:54:55 +01:00
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.
This commit is contained in:
parent
86f2c8e588
commit
179c6d20ef
@ -153,7 +153,7 @@ if [[ -n "${BLE_VERSION-}" ]] && ((_ble_version >= 400)); then
|
|||||||
#
|
#
|
||||||
function ble/complete/auto-complete/source:atuin-history {
|
function ble/complete/auto-complete/source:atuin-history {
|
||||||
local suggestion
|
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
|
[[ $suggestion == "$_ble_edit_str"?* ]] || return 1
|
||||||
ble/complete/auto-complete/enter h 0 "${suggestion:${#_ble_edit_str}}" '' "$suggestion"
|
ble/complete/auto-complete/enter h 0 "${suggestion:${#_ble_edit_str}}" '' "$suggestion"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user