-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Breakage after typing a [ #247
Comments
Looks like this is specific to |
I am receiving a similar error with the latest release (master @ 2cb6eb6 - (tag: v0.4.0)) when pressing the number sign (#):
|
I am having the same thing happen as @Birne94 except only on my remote machine. I have the same config in my local setup (both have the plugin up to date with master) and it can type It does not have a problem typing a |
I "fixed" this by changing the --- a/src/strategies/match_prev_cmd.zsh
+++ b/src/strategies/match_prev_cmd.zsh
@@ -26,7 +26,7 @@ _zsh_autosuggest_strategy_match_prev_cmd() {
# Get all history event numbers that correspond to history
# entries that match pattern $prefix*
local history_match_keys
- history_match_keys=(${(k)history[(R)$prefix*]})
+ history_match_keys=(${(k)history[(R)${(b)prefix}*]})
# By default we use the first history number (most recent history entry)
local histkey="${history_match_keys[1]}" not entirely sure if this is the best solution |
made a pull request: #267 |
Maybe this is also a fix for zsh-users#247, zsh-users#248 and zsh-users#258. Supersedes zsh-users#267. Testcase: Using match_prev_cmd strategy and with these lines in history: echo '1^' echo '2^' echo '1^' type: echo (unexpected suggestion echo '1^' instead of echo '2^') echo '1^1 (wrong suggestion echo '1^1echo '1^') echo '1^# (error "bad math expression")
Should be fixed now on |
This happens with 0.4.0, but not 0.3.3:
The
_zsh_autosuggest_strategy_match_prev_cmd
error pops up immediately after pressing the[
key..zshrc settings: https://gist.github.com/ivan/79de5e87210e8cf21e305bb4c30c4360#file-zshrc-L200-L206 possibly-relevant bit being
The text was updated successfully, but these errors were encountered: