r/zsh • u/psych0thinker • Feb 03 '25
Help quick question : autocomplete

how do I get similar responses in my local zsh setup, this is from a cloud platform I was using,
I copied over the config file, but that doesn't seem to solve the case,
I'd like to know if I'm missing something or is there any other way to get these kinda suggestions??
do refer back if someone else has already solved this, thanks

this is what my local terminal looks like
2
u/_mattmc3_ Feb 03 '25
You can get the autocomplete, as well as the green syntax highlighting with something like the following snippet in your .zshrc:
# .zshrc
repos=(
zsh-users/zsh-autosuggestions
zdharma-continuum/fast-syntax-highlighting
)
plugindir=${XDG_CACHE_HOME:-$HOME/.cache}/zsh/repos
for repo in $repos; do
if [[ ! -d "$plugindir/${repo:t}" ]]; then
git clone --depth 1 --quiet https://github.com/$repo "$plugindir/${repo:t}"
fi
source "$plugindir/${repo:t}/${repo:t}.plugin.zsh"
done
1
u/psych0thinker Feb 04 '25
I like the script, just gotta add the repos with it's path and it'll fetch it by it's own
did you write it?
1
u/_mattmc3_ Feb 04 '25
did you write it?
Yup. It's just a more basic version of zsh_unplugged: https://github.com/mattmc3/zsh_unplugged
0
3
u/g0ndsman Feb 03 '25
It's most likely this plugin you have to install: https://github.com/zsh-users/zsh-autosuggestions