Zsh autosuggestions not working when opeining new terminal

Hello,

This is my ~/.zshrc:

# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/home/my-user/.zshrc'

autoload -Uz compinit
compinit
# End of lines added by compinstall

export ZSH=/usr/share/oh-my-zsh
source $ZSH/oh-my-zsh.sh
plugins=(git zsh-autosuggestions)

# Just checking we reach here
echo hi

When opening a new terminal window autosuggestions doesn’t work. In order to make it work I have to manually enter at the new terminal:

source ~/.zshrc

What could be the problem?

TIA

I suggest not using oh-my-zsh. It’s rubbish. It’s easy to setup autosuggestions yourself, and it’s more transparent.

I am not using oh-my-zsh anymore.

I use the package zsh-autosuggestions and have this in my .zshrc:

if [[ -f /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh ]]; then
    . /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
    # change suggestion color
    # ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999'
    ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=208'
fi
1 Like

Hi mbod,

This works nicely. Thanks.

2 Likes

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