Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/coot/zsh-haskell
ghc and cabal completion for zsh shell
https://github.com/coot/zsh-haskell
cabal-completion ghc zsh zsh-completions
Last synced: 26 days ago
JSON representation
ghc and cabal completion for zsh shell
- Host: GitHub
- URL: https://github.com/coot/zsh-haskell
- Owner: coot
- License: mpl-2.0
- Created: 2020-01-25T15:46:38.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T20:07:39.000Z (almost 2 years ago)
- Last Synced: 2024-04-16T16:22:33.323Z (9 months ago)
- Topics: cabal-completion, ghc, zsh, zsh-completions
- Language: Shell
- Homepage:
- Size: 883 KB
- Stars: 17
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZSH shell plugin for Haskell
* completion for **ghc** options
* completion for **cabal** commands; it can expands cabal components (libraries,
tests, benchmarks and executables) and pkgs specs. It also complets options
of `cabal` commands and package names (e.g. `cabal info` or `cabal
install`)
* completion for **ghc-pkgs** commands & options# Usage
The completion script will find and inspect all cabal files under current
directory which are not deeper than four directories away. It does not descent
under `dist-newstye`, `dist`, `.stack-work` or `.git` directories.Completion for the following package specs is supported:
* `component-name` - it can be either a component name or a package name
* `package-name:{lib,test,exe,bench}:component-name`
* `package-name:{libs,tests,exes,benches}`
* `pkg:package-name:{lib,test,exe,bench}:component-name`.
* `pkg:package-name:{libs,tests,exes,benches}`.
* `lib:component-name`,
* `exec:component-name`,
* `bench:component-name`,
* `test:component-name`The last six are only triggered when `pkg:`, `lib:`, `exec:`, `bench:` or
`test:` are given **explicitly**. This is in order to avoid providing too many
completion results.# Configuration
```
zstyle ":completion::complete:cabal::options:" depth 4
```
Maximan directory depth for searching for `*.cabal` files.```
zstyle ":completion::complete:cabal::options:"
zstyle ":completion::complete:cabal::options:" packages-tmp-file "/tmp/zsh-haskell-cabal-packages"
```
File which stores list of package names. It will be created on demenad (e.g.
by completiting `cabal info` or `cabal install`, etc.).# Demo
![](https://raw.githubusercontent.com/coot/zsh-cabal/master/docs/screencast.gif)