You are not logged in.

#1 2014-11-10 00:09:20

dlin
Member
From: Taipei,Taiwan
Registered: 2005-09-21
Posts: 265

zsh completion can not work after re-login

I follow http://www.linux-mag.com/id/1106/

my .zshrc

autoload -U compinit
compinit
zstyle ':completion:*' verbose yes
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*' group-name
if [ -d ~/zshfunc ] ; then
  r() {
    local f
    f=(~/zshfunc/*(.))
    unfunction $f:t 2> /dev/null
    autoload -U $f:t
  }

  fpath=(~/zshfunc $fpath)
  autoload -U ~/zshfunc/*(:t)
fi

There is a ~/zshfunc/_fossil script, but it can not work after re-login.

The temp workaround is re-type 'compinit' manually.

fossil <tab> # will use file name as completion                                         
compinit                              
fossil <tab> # will show commands for fossil

Last edited by dlin (2014-11-10 00:47:14)


Running 4 ArchLinux including sh4twbox,server,notebook,desktop. my AUR packages

Offline

Board footer

Powered by FluxBB