zsh-autosuggestions icon indicating copy to clipboard operation
zsh-autosuggestions copied to clipboard

Fish-like autosuggestions for zsh

Results 196 zsh-autosuggestions issues
Sort by recently updated
recently updated
newest added

To reproduce: ```zsh . ./zsh-autosuggestions.zsh zle -N →demo ``` Then repeatedly run `printf '%q\n' ${functions[(I)*demo]}` and notice how the number of functions growing. Zsh-autosuggestions is not wrapping these functions correctly....

My autocomplete is working for all the commands except for `sudo apt autoremove`. Few days ago it was working, but now it won't work. I have tried quite a few...

/Users/ice/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh:source:1: no such file or directory: /Users/ice/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh^M

[{"_id":"632a4796d7e37411a83167c2","body":"macOS: 10.13.6\r\nzsh --verison\r\nzsh 5.8 (x86_64-apple-darwin17.7.0)","issue_id":1660145313348,"origin_id":728855960,"user_origin_id":43198678,"create_time":1605611153,"update_time":1605611153,"id":1663715222680,"updated_at":"2022-09-20T23:07:02.679000Z","created_at":"2022-09-20T23:07:02.679000Z"},{"_id":"632a4796d7e37411a83167c3","body":" I installed it\r\ngit clone git:\/\/github.com\/zsh-users\/zsh-autosuggestions $ZSH_CUSTOM\/plugins\/zsh-autosuggestions","issue_id":1660145313348,"origin_id":728856681,"user_origin_id":43198678,"create_time":1605611241,"update_time":1605611241,"id":1663715222683,"updated_at":"2022-09-20T23:07:02.682000Z","created_at":"2022-09-20T23:07:02.682000Z"},{"_id":"632a4796d7e37411a83167c4","body":"I have the same problem.\r\nWSL 2.0 \r\n```\r\nlsb_release -a No LSB modules are available.\r\nDistributor ID: Ubuntu\r\nDescription: Ubuntu 18.04.4 LTS\r\nRelease: 18.04\r\nCodename: bionic\r\n```\r\n\r\nzsh version\r\nzsh 5.4.2 (x86_64-ubuntu-linux-gnu)\r\n\r\n![image](https:\/\/user-images.githubusercontent.com\/9430353\/102175707-f8080580-3eda-11eb-80aa-070e52839d74.png)\r\n","issue_id":1660145313348,"origin_id":745065565,"user_origin_id":9430353,"create_time":1608010786,"update_time":1608010786,"id":1663715222686,"updated_at":"2022-09-20T23:07:02.686000Z","created_at":"2022-09-20T23:07:02.686000Z"},{"_id":"632a4796d7e37411a83167c6","body":"I had this same issue in WSL2, it was due to CLRF line endings on the files. Once I switched them to LF it worked fine.","issue_id":1660145313348,"origin_id":756376698,"user_origin_id":42529581,"create_time":1610052676,"update_time":1610052676,"id":1663715222691,"updated_at":"2022-09-20T23:07:02.690000Z","created_at":"2022-09-20T23:07:02.690000Z"}] comment

/Users/ice/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.plugin.zsh:source:1: no such file or directory: /Users/ice/.oh-my-zsh/custom/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh^M ![image](https://user-images.githubusercontent.com/43198678/99382436-85b9fa80-2907-11eb-8ecc-fa9897bfd2aa.png)

bug

It just can worked in one window

[{"_id":"632a4b04d7e37411a8316863","body":"I looked into this a little bit found some complex behavior. As a workaround for now, enabling async mode may help. And you can also look at some of the zsh options related to history (section 16.2.4 here: http:\/\/zsh.sourceforge.net\/Doc\/Release\/Options.html)","issue_id":1660145313351,"origin_id":432281664,"user_origin_id":79998,"create_time":1540306570,"update_time":1540306570,"id":1663716100096,"updated_at":"2022-09-20T23:21:40.096000Z","created_at":"2022-09-20T23:21:40.096000Z"},{"_id":"632a4b04d7e37411a8316864","body":"Does this have to do with ZLE `set-local-history`?\r\nI have `SHARE_HISTORY` turned on, so my Ctrl + R search could find history from other open sessions, but it's not the case with autosuggestion","issue_id":1660145313351,"origin_id":463261131,"user_origin_id":2174815,"create_time":1550074478,"update_time":1550074478,"id":1663716100100,"updated_at":"2022-09-20T23:21:40.100000Z","created_at":"2022-09-20T23:21:40.100000Z"},{"_id":"632a4b04d7e37411a8316865","body":"Are you a mac? The method in INSTALL.MD for mac will occur this situation. \r\nYou can try this:\r\nClone it into `~\/.zsh\/zsh-autosuggestions`\r\nAdd codes blow into `~\/.zshrc`\r\n```shell\r\n# Load zsh-autosuggestions.\r\nsource ~\/.zsh\/zsh-autosuggestions\/autosuggestions.zsh\r\n\r\n# Enable autosuggestions automatically.\r\nzle-line-init() {\r\n zle autosuggest-start\r\n}\r\nzle -N zle-line-init\r\n```\r\nThen \r\n```shell\r\nSource ~\/.zshrc\r\n```\r\n------\r\nThat works for me :)","issue_id":1660145313351,"origin_id":468286145,"user_origin_id":33691477,"create_time":1551363074,"update_time":1551363074,"id":1663716100104,"updated_at":"2022-09-20T23:21:40.103000Z","created_at":"2022-09-20T23:21:40.103000Z"},{"_id":"632a4b04d7e37411a8316866","body":"fwiw, I found a bug in Zsh related to this\r\nhttp:\/\/www.zsh.org\/mla\/workers\/2019\/msg00105.html\r\nYou may not have the exact same issue though","issue_id":1660145313351,"origin_id":469095476,"user_origin_id":2174815,"create_time":1551665899,"update_time":1551665899,"id":1663716100107,"updated_at":"2022-09-20T23:21:40.106000Z","created_at":"2022-09-20T23:21:40.106000Z"},{"_id":"632a4b04d7e37411a8316868","body":"I had the same problem and I solved it by changing the owner of the ~\/.zsh_history file.\r\n\r\nThe moment I closed the terminal, I noticed some error passing by. After checking, I realized that it was because the ~\/.zsh_history file was owned by root, and I was able to fix it after changing to user with the chown command.\r\n![Screenshot from 2020-12-08 22-45-58](https:\/\/user-images.githubusercontent.com\/36390128\/101493875-f8b80d80-39a9-11eb-8969-eaa15dd95ac4.png)\r\n","issue_id":1660145313351,"origin_id":740639655,"user_origin_id":36390128,"create_time":1607436387,"update_time":1607436387,"id":1663716100110,"updated_at":"2022-09-20T23:21:40.110000Z","created_at":"2022-09-20T23:21:40.110000Z"}] comment

exp : I open one window ,input 'source', then enter ,and then input 's', it's worked .But i open another window ,I input 's',It's not working.I'm so sadness

has-workaround
support

I use tmux When I use it auto suggestion works with the already available entries in the history But if I type some commands in one tab of tmux its...

After upgrading zsh 5.5.1 → 5.8.1 : zpty:23: can't open pseudo terminal: bad file descriptor

[{"_id":"661bbc766c617b7b500976a4","body":"Just encountered this issue, bumping this with some more information.\r\n\r\nOn further trial, it appears that `zpty` doesn't seem to work at all on cygwin? I'm not very familliar with `zpty` or `zsh`, but I would thing this would work:\r\n\r\n```bash\r\nzmodload zsh\/zpty\r\nzpty mytest 'echo hi'\r\n```\r\n\r\nBut it doesn't?\r\n```\r\nzpty: can't open pseudo terminal: bad file descriptor\r\n```\r\n\r\nI also found this thread about zpty not working on zsh with cygwin, so maybe this is just a long running issue?\r\n\r\nI don't really know were to begin, but any workarounds would be amazing.\r\n","issue_id":1660145313358,"origin_id":1422184173,"user_origin_id":105177619,"create_time":1675843249,"update_time":1675843291,"id":1713093750045,"updated_at":"2024-04-14T11:22:30.044000Z","created_at":"2024-04-14T11:22:30.044000Z"}] comment

### Describe the bug Under **cygwin x86_64/x86** After upgrading zsh from `5.5.1` to `5.8.1` , and enabling `ZSH_AUTOSUGGEST_STRATEGY=(completion)`, I'm getting the following error after typing commands that trigger suggestions (...

bug

### Describe the bug I use zsh with vi mode enabled (bindkey -v). When I'm on the command line with an active suggestion and I enter vicmd mode, I want...

bug

Conflict with `zsh-users/zsh-syntax-highlighting`

[{"_id":"632a4b0a0d68a95f041ca880","body":"I have also submitted this bug [here](https:\/\/github.com\/zsh-users\/zsh-syntax-highlighting\/issues\/647) ","issue_id":1660145313363,"origin_id":560277812,"user_origin_id":25852061,"create_time":1575273484,"update_time":1575273484,"id":1663716106568,"updated_at":"2022-09-20T23:21:46.567000Z","created_at":"2022-09-20T23:21:46.567000Z"},{"_id":"632a4b0a0d68a95f041ca881","body":"I'm not able to reproduce this either. What are you using to trigger `ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS`? What version of z-sy-h?","issue_id":1660145313363,"origin_id":571426301,"user_origin_id":79998,"create_time":1578370713,"update_time":1578370713,"id":1663716106571,"updated_at":"2022-09-20T23:21:46.570000Z","created_at":"2022-09-20T23:21:46.570000Z"},{"_id":"632a4b0a0d68a95f041ca882","body":"@elony314 I was able to reproduce this and put up PR #507 to fix. Give that branch (`fixes\/partial-accept-duplicate-word`) a shot and let me know if it looks good to you.","issue_id":1660145313363,"origin_id":580081892,"user_origin_id":79998,"create_time":1580359792,"update_time":1580359792,"id":1663716106574,"updated_at":"2022-09-20T23:21:46.573000Z","created_at":"2022-09-20T23:21:46.573000Z"},{"_id":"632a4b0a0d68a95f041ca883","body":"Hi folks, first of all, amazing work that you guys are doing.\r\n\r\nI came across this issue, but I don't know for sure If is the same.\r\n\r\nI record a gif to show what is happening.\r\n\r\n![ezgif-7-0841c4d7145c](https:\/\/user-images.githubusercontent.com\/5286092\/74858855-c2c77100-5324-11ea-86fa-7783cdfad44c.gif)\r\n\r\n\r\nWhat I did, typed `cd`, pasted something and then pressed the right arrow key.\r\nThe suggestion was duplicated because was the last command that I used.\r\n\r\nUPDATE: I gave I try to the branch `fixes\/partial-accept-duplicate-word` and is not working for me \ud83d\ude1e","issue_id":1660145313363,"origin_id":588345184,"user_origin_id":5286092,"create_time":1582133622,"update_time":1582133695,"id":1663716106577,"updated_at":"2022-09-20T23:21:46.576000Z","created_at":"2022-09-20T23:21:46.576000Z"},{"_id":"632a4b0a0d68a95f041ca884","body":"@weslley39 I think the original poster was describing the issue from this gif:\r\n\r\n![partial-accept](https:\/\/user-images.githubusercontent.com\/9750687\/75592918-753fb800-5a38-11ea-8b75-5fcaa8cc68e5.gif)\r\n\r\nI've opened a related issue (https:\/\/github.com\/zdharma\/fast-syntax-highlighting\/issues\/177) on the plugin I use for syntax highlighting.\r\n\r\nWeirdly I haven't been able to repro the same bug you're seeing on my machine but I have a coworker with a very similar setup who has reproed - http:\/\/g.recordit.co\/Z7NTQJ0lp4.gif","issue_id":1660145313363,"origin_id":592765340,"user_origin_id":9750687,"create_time":1582930236,"update_time":1582930945,"id":1663716106580,"updated_at":"2022-09-20T23:21:46.580000Z","created_at":"2022-09-20T23:21:46.580000Z"},{"_id":"632a4b0a0d68a95f041ca885","body":"In the meantime, a temporary workaround that seems fine so far on my machine is to use `fast-syntax-highlighting` without the asynchronous loading.\r\n\r\n@elony314 would be curious if switching to https:\/\/github.com\/zdharma\/fast-syntax-highlighting fixes the issue for you","issue_id":1660145313363,"origin_id":592765722,"user_origin_id":9750687,"create_time":1582930310,"update_time":1582931549,"id":1663716106583,"updated_at":"2022-09-20T23:21:46.583000Z","created_at":"2022-09-20T23:21:46.583000Z"},{"_id":"632a4b0a0d68a95f041ca886","body":"(Or try zsh-syntax-highlighting's `feature\/redrawhook` branch)\r\n\r\n~~(See https:\/\/github.com\/zsh-users\/zsh-syntax-highlighting\/issues\/579, though; tl;dr: there's a known issue, but it has a known fix)~~","issue_id":1660145313363,"origin_id":592771434,"user_origin_id":2141904,"create_time":1582931512,"update_time":1594753728,"id":1663716106588,"updated_at":"2022-09-20T23:21:46.588000Z","created_at":"2022-09-20T23:21:46.588000Z"},{"_id":"632a4b0a0d68a95f041ca887","body":"@ericfreese \r\nI was or wasn't able to reproduce it, depending on how many times I sourced my `~\/.zshrc` file:\r\nif I source it xxx times, it gives me xxx times too me xxx extra times the last word of the command.\r\nNote: in my example, I cancelled with <C-c> the `which pip` command each time so that I didn't changed the history\r\n![image](https:\/\/user-images.githubusercontent.com\/38837519\/90202522-3f23a400-ddde-11ea-9ff4-5c42490686f7.png)\r\n","issue_id":1660145313363,"origin_id":673812924,"user_origin_id":38837519,"create_time":1597368804,"update_time":1597368804,"id":1663716106592,"updated_at":"2022-09-20T23:21:46.592000Z","created_at":"2022-09-20T23:21:46.592000Z"},{"_id":"632a4b0a0d68a95f041ca888","body":"@ewen-goisot `source ~\/.zshrc` isn't doing what you expect it's doing. `source ~\/.zshrc` doesn't reload your zsh configuration and actually is a way to break your shell in multiple ways, with or without zsh-asug and z-syhl. In order to reload your zsh configuration do `exec zsh`. It's unreasonable to expect that plugins would continue working as expected after `source ~\/.zshrc`.","issue_id":1660145313363,"origin_id":673956830,"user_origin_id":787519,"create_time":1597393669,"update_time":1597393669,"id":1663716106595,"updated_at":"2022-09-20T23:21:46.595000Z","created_at":"2022-09-20T23:21:46.595000Z"},{"_id":"632a4b0a0d68a95f041ca889","body":"> `source ~\/.zshrc` doesn't reload your zsh configuration and actually is a way to break your shell in multiple ways, with or without zsh-asug and z-syhl. In order to reload your zsh configuration do `exec zsh`.\r\n\r\nWhether `source ~\/.zshrc` is or isn't a good idea isn't an absolute truth; it's a function of how the zshrc itself is written. (And `exec zsh` has its downsides too)\r\n\r\n> It's unreasonable to expect that plugins would continue working as expected after `source ~\/.zshrc`.\r\n\r\nFWIW, in z-sy-h's case, sourcing `zsh-syntax-highlighting.zsh` multiple times should work just fine, though highlighting would be computed multiple times, which would result in slowness.","issue_id":1660145313363,"origin_id":674276527,"user_origin_id":2141904,"create_time":1597439944,"update_time":1597439944,"id":1663716106598,"updated_at":"2022-09-20T23:21:46.598000Z","created_at":"2022-09-20T23:21:46.598000Z"},{"_id":"632a4b0a0d68a95f041ca88a","body":"Separately, the z-sy-h redrawhook branch was merged this week, so anyone who saw z-asug issues that were related to z-sy-h should update z-sy-h to latest master and see if the problems persist.","issue_id":1660145313363,"origin_id":674276575,"user_origin_id":2141904,"create_time":1597439951,"update_time":1597439951,"id":1663716106600,"updated_at":"2022-09-20T23:21:46.600000Z","created_at":"2022-09-20T23:21:46.600000Z"},{"_id":"632a4b0a0d68a95f041ca88b","body":"> @ewen-goisot `source ~\/.zshrc` isn't doing what you expect it's doing. `source ~\/.zshrc` doesn't reload your zsh configuration and actually is a way to break your shell in multiple ways, with or without zsh-asug and z-syhl. In order to reload your zsh configuration do `exec zsh`. It's unreasonable to expect that plugins would continue working as expected after `source ~\/.zshrc`.\r\n\r\n`exec zsh` works better (I don't get the last word repeated), you are perfectly right about this.\r\nBut `source ~\/.zshrc` is the only way for me to get this bug (the last word repeated).\r\n\r\n> though highlighting would be computed multiple times, which would result in slowness\r\n\r\nit can become very slow, because the sourcing time does not increase linearly (it's something between quadratic and exponential: if I run it 50 times, the last one needs 111.55 seconds for me.","issue_id":1660145313363,"origin_id":679966733,"user_origin_id":38837519,"create_time":1598354715,"update_time":1598354730,"id":1663716106603,"updated_at":"2022-09-20T23:21:46.602000Z","created_at":"2022-09-20T23:21:46.602000Z"},{"_id":"632a4b0a0d68a95f041ca88c","body":"> > though highlighting would be computed multiple times, which would result in slowness \n> it can become very slow, because the sourcing time does not increase linearly (it's something between quadratic and exponential: if I run it 50 times, the last one needs 111.55 seconds for me.\n\nReplied to that over on https:\/\/github.com\/zsh-users\/zsh-syntax-highlighting\/issues\/625.\n","issue_id":1660145313363,"origin_id":680715498,"user_origin_id":2141904,"create_time":1598427658,"update_time":1598427658,"id":1663716106606,"updated_at":"2022-09-20T23:21:46.605000Z","created_at":"2022-09-20T23:21:46.605000Z"}] comment

### Describe the bug There are conflicted between `zsh-users/zsh-syntax-highlighting` and `zsh-users/zsh-autosuggestions`. With both plugins activated, if one continuously uses `ZSH_AUTOSUGGEST_PARTIAL_ACCEPT_WIDGETS`, the last word of the suggestion will be duplicated. ###...

bug

zsh-autosuggestions suggest `\[` if I press space as the first character in the prompt

[{"_id":"632a4ae29db0c23793811438","body":"I think it is caused by `ZSH_AUTOSUGGEST_STRATEGY=(history completion)`","issue_id":1660145313365,"origin_id":672368140,"user_origin_id":855297,"create_time":1597189651,"update_time":1597189651,"id":1663716066485,"updated_at":"2022-09-20T23:21:06.484000Z","created_at":"2022-09-20T23:21:06.484000Z"},{"_id":"632a4ae29db0c23793811439","body":"I see the same issue, I use `ZSH_AUTOSUGGEST_COMPLETION_IGNORE=\"[[:space:]]*\"` to stop suggestions from appearing when the buffer is preceded by whitespace.","issue_id":1660145313365,"origin_id":679425138,"user_origin_id":15698885,"create_time":1598313609,"update_time":1598330728,"id":1663716066490,"updated_at":"2022-09-20T23:21:06.489000Z","created_at":"2022-09-20T23:21:06.489000Z"}] comment

If I press space as the first character in the prompt, it suggests `\[`. If I comment out `. ~/dotfiles/zsh/zsh-autosuggestions.zsh` this weird behaviour goes away.

bug