I have a software project that I'm attempting to write zsh completions for. After installing a package that provided a number of pre-made completions, I found they were put here:
/usr/share/zsh/site-functions So I wrote my completion script, and threw it in there too. ...and was frustrated by failure. I've tried the following:
- Symlinking to the original script from the directory above.
- Putting a copy of the script directly into the directory above.
- Setting my login shell to zsh (instead of just switching to it from another shell)
- (Probably) all permutations of
compinitandrehash. - Dumbing-down my original script so that there's no way it could be wrong.
- Changing the contents of another script. The changes worked, so the directory is correct and zsh is detecting completions scripts there.
Here is the dumbed-down script:
#compdef aura _arguments -s \ '-V[Version!]' \ '-h[Helpppp]' And the current contents of my .zshrc. I'm not normally a zsh user.
autoload -U compinit compinit zstyle ':completion:*' rehash true Please and thank you for any insight you can give. What am I missing?
EDIT: Contents of /usr/share/zsh/site-functions is:
_ack _adb _android _attach _aura _baselayout _bpython _brew _bundle _cap _choc _coffee _cower _cpanm _debuild _dhcpcd _ditz _emulator _eselect _fab _gas _gcc-config _geany _gem _genlop _gentoolkit _gentoo_packages _git-flow _github _git-pulls _git-wtf _google _gradle _heroku _jmeter _jmeter-plugins _jonas _knife _language_codes _layman _lein _lunar _lunchy _manage.py _mosh _mvn _node _optirun _pacman _pactree _pear _perf _periscope _pgsql_utils _pip _pkcon _play _port _portage _portage_utils _pygmentize _redis-cli _rvm _sbt _scala _sdd _setup.py _showoff _smartmontools _srm _ssh-copy-id _subliminal _symfony _systemd _teamocil _thor _tmuxinator _vagrant _virtualbox _vnstat _vpnc _yaourt
_aura? What doesecho $_comps[aura]show?_aura, butecho $_comps[aura]returns an empty string.fpath? What is the content of/usr/share/zsh/site-functions(which by the way is not the proper place to install your script,/usr/shareis reserved for the package manager, you should put your scripts under/usr/localor your home directory)? Are there*.zwcfiles around?fpathare:/usr/share/zsh/site-functionsand all directories under/usr/share/zsh/functions/. There were too many to type out..zwcfiles anywhere. I put the contents of/usr/share/zsh/site-functionsin the original post.