Zsh - Disable autosuggestions in terminal

Hi guys, I am using zsh or oh my zsh as my terminal. when I type some command, it suggests a similar command from history. I know It’s trying to help me, but is there a way to disable it?

maybe just suggests when I press the tab or something? I’m getting annoyed by this : (

tried removing zsh-autosuggestions from plugins in .zshrc but that didn’t help.

btw I’m using the powerlevel10k theme Idk If that matters.

Screenshot from 2021-11-07 11-32-31

1 Like

Thats one of the main ‘benefits’ of zsh … maybe you would like to just use bash instead ?
( I fully support this position :wink: )

You have several options:

  • Just enter the command you don’t want to keep in history with a leading space

  • Clean your ZSH history from time to time

printf "" > $HISTFILE
  • Disable history, and you will see suggestions for the current session only
printf "" > $HISTFILE
echo "function zshaddhistory() { return 1 }" >> ~/.zshrc
1 Like

When you press TAB it will show autocomplete.
Suggestions and autocomplete are two different things…

1 Like

You can set ZSH_AUTOSUGGEST_HISTORY_IGNORE=* in ~/.zshrc file to skip all suggestions from history file. If you have more specific options see GitHub - zsh-users/zsh-autosuggestions: Fish-like autosuggestions for zsh :wink:



If you tried this and restarted the shell exec zsh and you still getting auto-suggestions, then maybe the plugin is called from elsewhere. Check the powerlvl10k ~/.p10k.zsh or look in /etc if there is zshrc or zprofile… you get the point :slight_smile: .

Idk…if this will help, since I don’t use manjaro’s zsh config and powerlvl10k, but its worth a try :slight_smile:


The solution depends on if you will continue to use zsh or switch to bash

Switching to bash

sudo pacman -S bash-completion --needed

Then switch your shell

chsh -s /bin/bash

I note you refer to oh-my-zsh - and suggestions from history is set in in the plugins section of the .zshrc used by oh-my-zsh.

Your issue could be caused by mixing oh-my-zsh and manjaro-zsh-config

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.