Difference between revisions of "Zsh"
Line 1: | Line 1: | ||
− | ==Z Shell Completion for GHC and Hugs== |
+ | ==Z Shell Completion for GHC, Cabal and Hugs== |
The Z Shell is a powerful shell with extensive completion support. |
The Z Shell is a powerful shell with extensive completion support. |
||
Line 13: | Line 13: | ||
* system libraries (<tt>-l</tt> option) |
* system libraries (<tt>-l</tt> option) |
||
* <tt>ghc-pkg</tt> commands |
* <tt>ghc-pkg</tt> commands |
||
+ | |||
+ | The <tt>_cabal</tt> script support completion for the <tt>cabal</tt> |
||
+ | command. The completion features include the following: |
||
+ | |||
+ | * Cabal commands |
||
+ | * all options with a description for each option |
||
+ | * directories |
||
+ | * package names |
||
The <tt>_hugs</tt> script provides completion for options. |
The <tt>_hugs</tt> script provides completion for options. |
||
Line 43: | Line 51: | ||
==Download== |
==Download== |
||
− | [http://gemi.fedorapeople.org/haskell/_ghc _ghc] |
+ | [http://gemi.fedorapeople.org/haskell/_ghc _ghc] |
+ | [http://gemi.fedorapeople.org/haskell/_hugs _hugs] |
||
− | |||
− | [http://gemi.fedorapeople.org/haskell/ |
+ | [http://gemi.fedorapeople.org/haskell/_cabal _cabal] |
[[Category:Tools]] |
[[Category:Tools]] |
Revision as of 13:12, 11 September 2009
Z Shell Completion for GHC, Cabal and Hugs
The Z Shell is a powerful shell with extensive completion support.
Features
The _ghc script supports completion for ghc and ghc-pkg. The completion features include the following:
- all options with a description for each option
- directories
- package names
- system libraries (-l option)
- ghc-pkg commands
The _cabal script support completion for the cabal command. The completion features include the following:
- Cabal commands
- all options with a description for each option
- directories
- package names
The _hugs script provides completion for options.
Installation
Put the _ghc and _hugs scripts in a path that zsh searches during autoloading, for example /usr/share/zsh/functions or a private directory (which must be added to the FPATH environment variable).
Completion must be enabled by adding to .zshrc the following lines:
autoload -U compinit compinit
Completion functionality can be configured using styles. These are set with the zstyle function.
Here are some examples:
zstyle ':completion:*' completer _complete _match _approximate zstyle ':completion:*' use-cache on zstyle ':completion:*:approximate:*' max-errors 1 numeric
See the zsh documenation for details on configuring the completion system.
Download
_ghc _hugs _cabal