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

[oh-my-zsh] plugin 'zsh-autosuggestions' not found

[{"_id":"66c2217065e3f042b80520b0","body":"Encountering the same issue on Ubuntu 20.04 LTS.","issue_id":1708364493695,"origin_id":1859350566,"user_origin_id":37182124,"create_time":1702859687,"update_time":1702859687,"id":1723998576890,"updated_at":"2024-08-18T16:29:36.889000Z","created_at":"2024-08-18T16:29:36.889000Z"},{"_id":"66c2217065e3f042b80520b1","body":"Having the same issue. Installed using homebrew on macos","issue_id":1708364493695,"origin_id":1906910867,"user_origin_id":43350767,"create_time":1706043648,"update_time":1706043648,"id":1723998576896,"updated_at":"2024-08-18T16:29:36.895000Z","created_at":"2024-08-18T16:29:36.895000Z"},{"_id":"66c2217065e3f042b80520b2","body":"Same issue on Linux Mint ( Ubuntu 22.04 LTS )","issue_id":1708364493695,"origin_id":1927754666,"user_origin_id":4725367,"create_time":1707157978,"update_time":1707158023,"id":1723998576900,"updated_at":"2024-08-18T16:29:36.899000Z","created_at":"2024-08-18T16:29:36.899000Z"},{"_id":"66c2217065e3f042b80520b4","body":"I have the same issue on Kubuntu 23.10","issue_id":1708364493695,"origin_id":1983419920,"user_origin_id":91375731,"create_time":1709814963,"update_time":1709814963,"id":1723998576904,"updated_at":"2024-08-18T16:29:36.904000Z","created_at":"2024-08-18T16:29:36.904000Z"},{"_id":"66c2217065e3f042b80520b5","body":"This has worked for me in mac, hopefully should work on other systems too \ud83d\ude38 \r\n\r\n```bash\r\n$ git clone --depth 1 https:\/\/github.com\/zsh-users\/zsh-autosuggestions \"${ZSH_CUSTOM:-~\/.oh-my-zsh\/custom}\"\/plugins\/zsh-autosuggestions\r\n```","issue_id":1708364493695,"origin_id":2000596546,"user_origin_id":38211728,"create_time":1710542678,"update_time":1710542678,"id":1723998576909,"updated_at":"2024-08-18T16:29:36.908000Z","created_at":"2024-08-18T16:29:36.908000Z"},{"_id":"66c2217065e3f042b80520b6","body":"> This has worked for me in mac, hopefully should work on other systems too \ud83d\ude38\r\n> \r\n> ```shell\r\n> $ git clone --depth 1 https:\/\/github.com\/zsh-users\/zsh-autosuggestions \"${ZSH_CUSTOM:-~\/.oh-my-zsh\/custom}\"\/plugins\/zsh-autosuggestions\r\n> ```\r\n\r\nArch - work for me too.","issue_id":1708364493695,"origin_id":2285505986,"user_origin_id":3672314,"create_time":1723532974,"update_time":1723532974,"id":1723998576913,"updated_at":"2024-08-18T16:29:36.912000Z","created_at":"2024-08-18T16:29:36.912000Z"}] comment

installed via package manager [zsh-autosuggestions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-autosuggestions&package=zsh-autosuggestions) but it doesn't work, what am I missing?

bug

ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE

[{"_id":"66c2216618409968dc0a4e7c","body":"Yup same thing here, if anyone has a workaround that'd be great\r\n\r\n<img width=\"376\" alt=\"Screenshot 2023-07-22 at 10 00 41 AM\" src=\"https:\/\/github.com\/zsh-users\/zsh-autosuggestions\/assets\/6843426\/532ed321-3522-41cb-8d66-2a0b33d14922\">\r\n","issue_id":1708364493704,"origin_id":1646630220,"user_origin_id":6843426,"create_time":1690045274,"update_time":1690045274,"id":1723998566980,"updated_at":"2024-08-18T16:29:26.980000Z","created_at":"2024-08-18T16:29:26.980000Z"},{"_id":"66c2216618409968dc0a4e7d","body":"Also happens on Arch","issue_id":1708364493704,"origin_id":1702627322,"user_origin_id":13817763,"create_time":1693569151,"update_time":1693569151,"id":1723998566985,"updated_at":"2024-08-18T16:29:26.984000Z","created_at":"2024-08-18T16:29:26.984000Z"},{"_id":"66c2216618409968dc0a4e7e","body":"I have this set in my `.zshrc`:\r\n```\r\nexport ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=\"fg=8\"\r\n```\r\n\r\nThis is what happens to me in neovim+tmux:\r\n![image](https:\/\/github.com\/zsh-users\/zsh-autosuggestions\/assets\/996134\/8ef9b607-082f-413a-ba61-84745ab70b4d)\r\n\r\n\r\nThis is what happens when using only tmux\r\n![image](https:\/\/github.com\/zsh-users\/zsh-autosuggestions\/assets\/996134\/7b5d5170-c595-47f7-98bc-82fb3a383ee8)\r\n\r\nI'm not sure if this issue is related but it's really hard to use the plugin \ud83d\ude22.\r\n","issue_id":1708364493704,"origin_id":1703890226,"user_origin_id":996134,"create_time":1693674451,"update_time":1693674474,"id":1723998566991,"updated_at":"2024-08-18T16:29:26.990000Z","created_at":"2024-08-18T16:29:26.990000Z"},{"_id":"66c2216718409968dc0a4e7f","body":"setting `export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=\"fg=#f1d687\"` in my `~\/.zshrc` worked for me, it is a similar colour to the default.","issue_id":1708364493704,"origin_id":1703970952,"user_origin_id":9354142,"create_time":1693700298,"update_time":1693700298,"id":1723998567004,"updated_at":"2024-08-18T16:29:27.004000Z","created_at":"2024-08-18T16:29:27.004000Z"},{"_id":"66c2216718409968dc0a4e80","body":"I had the same problem with\r\n```bash\r\nZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=\"fg=#aaa\"\r\n```\r\n![image](https:\/\/github.com\/zsh-users\/zsh-autosuggestions\/assets\/26609879\/81ea5c03-4d2c-43f6-9be3-58b6e385c0a3)\r\nIt works with full color hex\r\n```bash\r\nZSH_AUTOSUGGEST_HIGHLIGHT_STYLE=\"fg=#aaaaaa\"\r\n```\r\n![image](https:\/\/github.com\/zsh-users\/zsh-autosuggestions\/assets\/26609879\/7fece3c1-8275-43a3-b7bc-e63977d25e0c)\r\n","issue_id":1708364493704,"origin_id":1924454146,"user_origin_id":26609879,"create_time":1706898403,"update_time":1706898426,"id":1723998567014,"updated_at":"2024-08-18T16:29:27.014000Z","created_at":"2024-08-18T16:29:27.014000Z"},{"_id":"66c2216718409968dc0a4e81","body":"Problem seems to be that when `fg=7` (or anything below 8, at least in my terminal) is added to [`region_highlight`](https:\/\/zsh.sourceforge.io\/Doc\/Release\/Zsh-Line-Editor.html#Zle-Widgets) (which is doing the highlighting), it is implicitly replaced by the color name. When undoing the highlighting, this plugin searches for `fg=7` exactly to replace it, which then fails.\r\n\r\nIt's likely more robust to use the `memo` property for this.\r\nEDIT: `memo` seems to be a ZSH 5.9 feature (the latest version at the time of writing), so not sure whether it makes sense to bump the version requirement to 5.9 for this","issue_id":1708364493704,"origin_id":2122492696,"user_origin_id":2452038,"create_time":1716293409,"update_time":1716294181,"id":1723998567025,"updated_at":"2024-08-18T16:29:27.024000Z","created_at":"2024-08-18T16:29:27.024000Z"}] comment

### Describe the bug let's assume that we want to type ls -lha ~/Desktop if I type the whole command then everything works as expected, but if I type "ls...

bug

Strange behavior when aliasing `echo`

[{"_id":"66c22167a5570c2d15022765","body":"I like to use 'alias echo=\"echo -n\"' and it completely breaks zsh-autosuggestion.\r\n\r\nEdit:\r\nFor my special use case I changed:\r\n\r\n`echo $sysparams[pid]`\r\n\r\nto\r\n\r\n`\/usr\/bin\/echo $sysparams[pid]`","issue_id":1708364493716,"origin_id":1986790787,"user_origin_id":13643837,"create_time":1709972214,"update_time":1709997252,"id":1723998567045,"updated_at":"2024-08-18T16:29:27.044000Z","created_at":"2024-08-18T16:29:27.044000Z"}] comment

### Describe the bug When aliasing `echo`, the suggestions become strange. ### To Reproduce Steps to reproduce the behavior: ```sh % zsh -df % source path/to/zsh-autosuggestions.zsh % alias echo='echo 123'...

bug
reproduced

I have something `export SCHRODINGER=/opt/schrodinger/suites2023-3` in my .zshrc. If i type this out, you can see I have the option of selection some command or folder with more command But...

### Describe the bug Seemingly out of the blue after a fedora update, I get the following error when pressing backspace: ``` ❯ lalala No such widget `.manydots-magic.orig.backward-delete-char' ``` Disabling...

bug

Cant source .bash file

[{"_id":"66c22171a5570c2d15022766","body":"Just a heads up, the error is coming from inside the file at line 8.","issue_id":1708364493746,"origin_id":1879921478,"user_origin_id":43008152,"create_time":1704596088,"update_time":1704596088,"id":1723998577083,"updated_at":"2024-08-18T16:29:37.082000Z","created_at":"2024-08-18T16:29:37.082000Z"}] comment

### Cant source .bash file When I put the following instruction in the .zshrc ```sh % source /opt/ros/melodic/setup.bash ``` ### It appears ```sh % /opt/ros/melodic/setup.bash:.:8: No such file or directory:...

bug

Ghost text appearing after pasting another text

[{"_id":"66c22167d340b986da0bf3db","body":"I have the same issue on openSUSE Tumbleweed with GNOME.\r\nWhen inserting text and pressing the right arrow key when previously text was auto suggested, it gets inserted anyway","issue_id":1708364493750,"origin_id":1837112099,"user_origin_id":19935382,"create_time":1701512374,"update_time":1701512374,"id":1723998567132,"updated_at":"2024-08-18T16:29:27.132000Z","created_at":"2024-08-18T16:29:27.132000Z"},{"_id":"66c22167d340b986da0bf3dc","body":"this is a known issue of ZSH, usually it can be fixed by setting the `$LOCALE` properly.\r\n\r\n```shell\r\necho \"export LANG=en_US.UTF-8\" >> .zshenv\r\necho \"export LC_ALL=en_US.UTF-8\" >> .zshenv\r\n```","issue_id":1708364493750,"origin_id":1870875535,"user_origin_id":85087583,"create_time":1703746086,"update_time":1703746123,"id":1723998567148,"updated_at":"2024-08-18T16:29:27.147000Z","created_at":"2024-08-18T16:29:27.147000Z"},{"_id":"66c22167d340b986da0bf3dd","body":"> this is a known issue of ZSH, usually it can be fixed by setting the `$LOCALE` properly.\r\n> \r\n> ```shell\r\n> echo \"export LANG=en_US.UTF-8\" >> .zshenv\r\n> echo \"export LC_ALL=en_US.UTF-8\" >> .zshenv\r\n> ```\r\n\r\nThis doesn't fix the issue for me with autosuggestions c3d4e576c9c86eac62884bd47c01f6faed043fc5 and zsh 5.9 (x86_64-pc-msys) in Windows Terminal\r\n\r\n\r\nhttps:\/\/github.com\/zsh-users\/zsh-autosuggestions\/assets\/692914\/969b894b-6abd-4ac3-a57e-c238b5680009\r\n\r\nEDIT: I was able to fix this bug by removing \"completion\" as an autosuggest strategy in my .zshrc\r\n\r\n```diff\r\n- ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history completion)\r\n+ ZSH_AUTOSUGGEST_STRATEGY=(match_prev_cmd history)\r\n```\r\n\r\n\r\n\r\n","issue_id":1708364493750,"origin_id":1967541544,"user_origin_id":692914,"create_time":1709065914,"update_time":1709067668,"id":1723998567157,"updated_at":"2024-08-18T16:29:27.156000Z","created_at":"2024-08-18T16:29:27.156000Z"},{"_id":"66c22167d340b986da0bf3de","body":"Have you relaunch your terminal after this?","issue_id":1708364493750,"origin_id":1968334395,"user_origin_id":85087583,"create_time":1709102711,"update_time":1709102711,"id":1723998567170,"updated_at":"2024-08-18T16:29:27.169000Z","created_at":"2024-08-18T16:29:27.169000Z"},{"_id":"66c22167d340b986da0bf3df","body":"Yes, I relaunched after removing \"completion\" and the ghost text is gone now. So it is something not working with the \"completion\" strategy, for me at least.","issue_id":1708364493750,"origin_id":1968389619,"user_origin_id":692914,"create_time":1709105575,"update_time":1709105606,"id":1723998567172,"updated_at":"2024-08-18T16:29:27.172000Z","created_at":"2024-08-18T16:29:27.172000Z"}] comment

### Describe the bug ### To Reproduce Steps to reproduce the behavior: When pasting any text after a command, a ghost text (last match) on right appears when pressing the...

bug

Issues with history

[{"_id":"66c22159d340b986da0bf3ce","body":"Hi, I'm not able to understand the problem you're describing.\r\n\r\nCan you add steps to reproduce using this template\r\n\r\n```\r\n% zsh -df\r\n% source path\/to\/zsh-autosuggestions.zsh\r\n% ... # what do you do to reproduce?\r\n```\r\n\r\nScreenshots may also be helpful","issue_id":1708364493755,"origin_id":1435350487,"user_origin_id":79998,"create_time":1676673027,"update_time":1676673027,"id":1723998553169,"updated_at":"2024-08-18T16:29:13.169000Z","created_at":"2024-08-18T16:29:13.169000Z"},{"_id":"66c22159d340b986da0bf3cf","body":"I have this same problem. I know what you're talking about. It is difficult to explain but I will do my best.\r\n\r\nLet's say my zsh_history looks like this:\r\n```\r\ncd \/etc\r\nls -la\r\necho \"hello 12345\"\r\necho \"hello 123\"\r\nuname -a\r\ncat \/etc\/hosts\r\n```\r\n\r\nIf I want to re-run the command `echo \"hello 123\"`. \r\nI type `echo \"h` and there will be the option in the ghost text to complete the rest of the line `ello 123\"`. If I press the RIGHT arrow key, my cursor will go to the end of the line and now in my terminal I will have the full command `echo \"hello 123\"` ready to be run. \r\n\r\nIf I hit the UP arrow key, I will go to `echo \"hello 12345\"`, since that also matches the same preceding characters in my zsh_history. \r\n\r\nHowever, let's say I change my mind, I don't want to run the `echo` command at all, I instead want to use the UP arrow key to cycle through my history and rerun the last command I ran `cat \/etc\/hosts`. \r\n\r\nRemember, `echo \"12345\"` is currently in my terminal typed out. I would expect that since there is no other history matches for `echo \"12345*\"` in my history (like there is not a history entry for `echo \"123456789\"`) that hitting the UP arrow should just take me to `cat \/etc\/hosts`. But that is not what happens... The terminal is locked so I have to hit `CTRL+C` to cancel the command I have typed out and get a clean prompt, or I have to press DELETE enough times to clear the terminal before I can cycle through my history like normal. \r\n\r\nIt is incredibly frustrating because this is such a great plugin but it effectively overwrites the default ZSH behavior that is in place if you do not run this plugin. I think there has to be a way to tinker with the keybinds that this module creates so that the plugin can still provide the utility it intends to while still playing nice with the default behavior that users expect. ","issue_id":1708364493755,"origin_id":1448583810,"user_origin_id":107429937,"create_time":1677605407,"update_time":1677605407,"id":1723998553174,"updated_at":"2024-08-18T16:29:13.174000Z","created_at":"2024-08-18T16:29:13.174000Z"},{"_id":"66c22159d340b986da0bf3d0","body":"Also, another thing I noticed:\r\nIf you are cycling through your history with the UP and DOWN arrow keys, and then you hit the RIGHT arrow key to go to the end of the line, and then you hit the LEFT arrow key you will no longer be able to cycle through the remaining history. \r\nThe LEFT arrow key seems to mess up the ability for you to continue searching through the history. ","issue_id":1708364493755,"origin_id":1448682644,"user_origin_id":107429937,"create_time":1677609778,"update_time":1677609778,"id":1723998553178,"updated_at":"2024-08-18T16:29:13.177000Z","created_at":"2024-08-18T16:29:13.177000Z"},{"_id":"66c22159d340b986da0bf3d1","body":"same issue\r\nup\/down arrow doesn't iterate history but stunned when already accept part of completion, as @0x303 says, it will try to match history instead switch to last\/next history.","issue_id":1708364493755,"origin_id":1862653598,"user_origin_id":49265026,"create_time":1702988200,"update_time":1702988200,"id":1723998553182,"updated_at":"2024-08-18T16:29:13.182000Z","created_at":"2024-08-18T16:29:13.182000Z"},{"_id":"66c22159d340b986da0bf3d2","body":"after searching for a while, i reslove it.\r\nthought from [another isuue](https:\/\/github.com\/zsh-users\/zsh-autosuggestions\/issues\/241#issuecomment-375003340), we can use below command to know which functionality is bound to up\/down key\r\n```bash\r\nbindkey $terminfo[kcuu1]\r\n```\r\noutput: `\"^[OA\" up-line-or-beginning-search`, the \"^[OA\" is up arrow. so the up arrow is default bound to up-line-or-beginning-search which maybe be same as [history-beginning-search-forward](https:\/\/zsh.sourceforge.io\/Doc\/Release\/Zsh-Line-Editor.html#History-Control:~:text=history%2Dbeginning%2Dsearch%2Dforward)\r\n\r\nso, just change binding: up arrow to up-line-or-history, and down arrow to down-line-or-history\r\n```bash\r\n# .zshrc\r\n# add this\r\nbindkey '^[OA' up-line-or-history\r\nbindkey '^[OB' down-line-or-history\r\n```\r\n","issue_id":1708364493755,"origin_id":1862759182,"user_origin_id":49265026,"create_time":1702992430,"update_time":1702992466,"id":1723998553187,"updated_at":"2024-08-18T16:29:13.186000Z","created_at":"2024-08-18T16:29:13.186000Z"}] comment

It seems to only parse the last 15 lines of the history file and constantly begins every page at the newest entry. Sometimes only a few entries (3-4) are shown,...

bug

Fix plugin for shells with `no_unset` (aka `set -u`) and `ksh_arrays` shell options set

[{"_id":"66c2218b65e3f042b80520b8","body":"Just going to comment on this: `set -u` is useful in interactive contexts, and it would be nice to have it in autosuggestions.","issue_id":1708364493760,"origin_id":1852477428,"user_origin_id":73304952,"create_time":1702401686,"update_time":1702401686,"id":1723998603927,"updated_at":"2024-08-18T16:30:03.926000Z","created_at":"2024-08-18T16:30:03.926000Z"},{"_id":"66c2218b65e3f042b80520b9","body":"`set -u` isn't useful in any way in interactive shell, see discussion at https:\/\/github.com\/romkatv\/powerlevel10k\/issues\/2652.","issue_id":1708364493760,"origin_id":2135590819,"user_origin_id":787519,"create_time":1716911494,"update_time":1716911494,"id":1723998603995,"updated_at":"2024-08-18T16:30:03.995000Z","created_at":"2024-08-18T16:30:03.995000Z"},{"_id":"66c2218c65e3f042b80520ba","body":"> `set -u` isn't useful in any way in interactive shell\r\n\r\nis incorrect and the [latest message](https:\/\/github.com\/romkatv\/powerlevel10k\/issues\/2652#issuecomment-2070935444) in [romkatv\/powerlevel10k\u202f#2652](https:\/\/github.com\/romkatv\/powerlevel10k\/issues\/2652) is incorrect. When you source a function like this:\r\n```zsh\r\n$ cat .\/foo && . .\/foo\r\nbreak_nounset() {\r\n printf 'foo%s\\n' \"${this_variable_does_not_exist}\"\r\n}\r\n```\r\nit returns different results based on user settings\r\n```zsh\r\n$ set -u && break_nounset\r\nbreak_nounset:1: this_variable_does_not_exist: parameter not set\r\n$ set +u && break_nounset\r\nfoo\r\n```\r\n\r\nHaving `set -u` in an interactive shell is invaluable while dogfooding works in progress.\r\n\r\n","issue_id":1708364493760,"origin_id":2135654742,"user_origin_id":91468,"create_time":1716913188,"update_time":1716913188,"id":1723998604003,"updated_at":"2024-08-18T16:30:04.002000Z","created_at":"2024-08-18T16:30:04.002000Z"},{"_id":"66c2218c65e3f042b80520bb","body":"That's the whole point. `nounset` is useful in script and isn't useful in interactive session. If you decided that that `nounset` must be enabled during interactive session for some deliberate reason, it's on you to deal with consequences.\r\n\r\nI must emphasize, zsh-autosuggestions is designed to run in interactive session, it's expected to have sane defaults in interactive session, `set -u` isn't part of said defaults.","issue_id":1708364493760,"origin_id":2137212210,"user_origin_id":787519,"create_time":1716983092,"update_time":1716983092,"id":1723998604012,"updated_at":"2024-08-18T16:30:04.011000Z","created_at":"2024-08-18T16:30:04.011000Z"},{"_id":"66c2218c65e3f042b80520bc","body":"> I must emphasize, zsh-autosuggestions is designed to run in interactive session, it's expected to have sane defaults\r\n\r\nIt appears that much of the codebase does allow for a user to work with it interactively, even if `set -o nounset`\/`set -u`\/`setopt nounset` is activated. In 2019, for example, the codebase was modified so that users with `set -o sh_word_split`\/`set -y`\/`setopt sh_word_split` in their interactive shell can keep easy access ([`4cd210b70d`](https:\/\/github.com\/zsh-users\/zsh-autosuggestions\/commit\/4cd210b70d20e24946d68a4957cb4a90ff97cc44)).\r\n\r\nI see plenty of benefit in publishing changes that would allow this plugin to degrade gracefully and work for users coming with various options set.\r\n\r\nWhat\u2019s the benefit of preventing this merge?","issue_id":1708364493760,"origin_id":2138074245,"user_origin_id":91468,"create_time":1717009273,"update_time":1717009273,"id":1723998604020,"updated_at":"2024-08-18T16:30:04.020000Z","created_at":"2024-08-18T16:30:04.020000Z"}] comment