Skip to content

Z Shell Completion Script

rshhh edited this page Mar 7, 2011 · 15 revisions

Z Shell Completion Script

This script will help you if you are using zsh for your shell.
This handles all options/commands documented, and optimizes the file glob behavior for installation from local files or directories.

Installation

1. Create a file named _cpanm in one of your $fpath directory.

The Completion/Unix directory might be a good place to put it in. (Unix is a directory for general external commands' scripts.)
For Ubuntu, it should be located at: /usr/share/zsh/functions/Completion/Unix/

Note: you can't change the name of the script, it should be '_' + "command's name".

2. Paste the following code into _cpanm:

# Editing... 

3. Restart your shell

That's it!

See also:

% man zshcompsys

Clone this wiki locally