Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lets-cli/lets-zsh-plugin
A zsh completion plugin for Lets
https://github.com/lets-cli/lets-zsh-plugin
bash completion lets zsh zsh-plugins
Last synced: about 2 months ago
JSON representation
A zsh completion plugin for Lets
- Host: GitHub
- URL: https://github.com/lets-cli/lets-zsh-plugin
- Owner: lets-cli
- License: mit
- Created: 2020-02-27T21:50:08.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-06-29T21:07:49.000Z (11 months ago)
- Last Synced: 2024-01-25T17:36:49.002Z (4 months ago)
- Topics: bash, completion, lets, zsh, zsh-plugins
- Language: Shell
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Lists
- awesome-zsh-plugins - lets-cli - Add autocompletion for [lets](https://github.com/lets-cli/lets) cli task runner. (Completions / ZSH on Windows)
- fucking-awesome-zsh-plugins - lets-cli - Add autocompletion for <b><code> 71â</code></b> <b><code> 8đ´</code></b> [lets](https://github.com/lets-cli/lets)) cli task runner. (Completions / ZSH on Windows)
- awesome-zsh-plugins - lets - Add autocompletion for [lets](https://github.com/lets-cli/lets) cli task runner. (Completions / ZSH on Windows)
- awesome-zsh-plugins - lets - Add autocompletion for [lets](https://github.com/lets-cli/lets) cli task runner. (Completions / Zinit (nÊe zplugin))
README
# zsh autocompletion plugin for lets
Lets is a cli tool for developers that is a better alternative to make - https://github.com/lets-cli/lets
## Install as plugin
**oh-my-zsh**
Just clone plugin to oh-my-zsh plugins directory
```sh
cd ~/.oh-my-zsh/custom/plugins/
git clone https://github.com/lets-cli/lets-zsh-plugin.git lets
```Open `~/.zshrc` and add `lets` to `plugins`
```shell script
plugins=(lets)
```**zinit**
Add to your `~/.zshrc`
```sh
zinit load lets-cli/lets-zsh-plugin
```## Manual completions setup
You can set up completions manually (no plugins).
Usually to make completion works you have to make sure that:
1. A file with completions exists
2. A path to directory with a file with completions is in `$fpath` env.`lets` can generate completions script for you
```bash
lets completion -s zsh
```
This will print completion script, and you have to save it somewhere, for example:```bash
lets completion -s zsh ~/.my-completions/_lets
```Now, add `~/.my-completions/_lets` to `fpath`
```bash
fpath=(~/.my-completions $fpath)
```And just to be sure that everything will work as expected fine, rebuild `zcompdump`:
```bash
rm -f ~/.zcompdump; compinit
```> Do not forget to add autoload call to the end of file (it actually can be after plugins section, but its better to add it to the end of `~/.zshrc`)
```shell script
autoload -U compinit && compinit
```Restart terminal
```shell script
exec $SHELL -l
```### Manual configuration for zinit
Since `zinit` adds `~/.local/share/zinit/completions` to `fpath`, you just need to put completions to that directory:
```sh
lets completion -s zsh > ~/.local/share/zinit/completions/_lets
```### Manual configuration for oh-my-zsh
For `oh-my-zsh` these are usually one of the following directories in `fpath`:
- ~/.oh-my-zsh/completions
- ~/.zsh/completions```sh
lets completion -s zsh > ~/.oh-my-zsh/completions/_lets.zsh
```### Source completions on shell load
You can just add `source <(lets completion -s zsh)` to your `~/.zshrc` file, save it and reload shell. Completions should work.
If completions does not work, try to put `source <(lets completion -s zsh)` after line with `autoload -U compinit && compinit`, like this:
```bash
autoload -U compinit && compinit
source <(lets completion -s zsh)
```### Configution
For zsh there is `--verbose` flag which generate completions with descriptions, like this:```shell script
lets
... generated completionsbuild -- Build my app
run -- Run my app
test -- Test my app
``````bash
lets completion -s zsh --verbose
```