You are not logged in.

#1 2010-09-10 19:14:32

jankowiak
Member
Registered: 2009-11-19
Posts: 8

zsh doesn't refresh completion after pacman -S

I just switched from bash to zsh to test it out but I ran into one small inconvenience... After installing any program with pacman unfortunately zsh doesn't find the installed program when using completion, if I type out the full name it works fine, or if I open a new shell...

Any suggestions on how to fix this?

Offline

#2 2010-09-10 19:32:31

Octoploid
Member
From: Berlin, Germany
Registered: 2009-10-13
Posts: 64

Re: zsh doesn't refresh completion after pacman -S

 % rehash  

Offline

#3 2010-09-10 19:51:22

jankowiak
Member
Registered: 2009-11-19
Posts: 8

Re: zsh doesn't refresh completion after pacman -S

Thanks for that, makes life a lot easier.

Offline

#4 2015-06-29 17:00:59

Creak
Member
Registered: 2013-10-23
Posts: 89

Re: zsh doesn't refresh completion after pacman -S

Is there a way to rehash automatically after an installation?
In other words, how Bash is able to do that?

Offline

#5 2015-06-29 17:04:46

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,019

Re: zsh doesn't refresh completion after pacman -S

Offline

#6 2015-06-29 17:42:02

Creak
Member
Registered: 2013-10-23
Posts: 89

Re: zsh doesn't refresh completion after pacman -S

Got my answer here: https://github.com/robbyrussell/oh-my-zsh/issues/3440

You need to add this line in your .zshrc:

zstyle ':completion:*' rehash true

Offline

#7 2015-06-29 18:08:37

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: zsh doesn't refresh completion after pacman -S

The answer is, as lucke pointed out, in the wiki. Rather than relying on the stupid Oh-my-zsh, please read the wiki or Zsh's excellent documentation and don't necrobump:
https://wiki.archlinux.org/index.php/Fo … bumping.22



Closing


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

Board footer

Powered by FluxBB