https://github.com/duologic/jb-index
This is a zsh-completion definition (compdef) for jsonnet-bundler and a few scripts to support this.
https://github.com/duologic/jb-index
jsonnet-bundler zsh-completion
Last synced: about 1 year ago
JSON representation
This is a zsh-completion definition (compdef) for jsonnet-bundler and a few scripts to support this.
- Host: GitHub
- URL: https://github.com/duologic/jb-index
- Owner: Duologic
- Created: 2023-06-20T20:57:24.000Z (almost 3 years ago)
- Default Branch: master
- Last Pushed: 2023-06-22T20:39:40.000Z (almost 3 years ago)
- Last Synced: 2025-01-27T10:43:30.116Z (over 1 year ago)
- Topics: jsonnet-bundler, zsh-completion
- Language: Jsonnet
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# jb-index
This is a zsh-completion definition (compdef) for [jsonnet-bundler](https://github.com/jsonnet-bundler/jsonnet-bundler/) and a few scripts to support this.
`jb update` completion works out of the box, it'll look for entries in the `jsonnetfile.lock.json` file in the current directory.
For `jb install` we first need to render an index.jsonnet file with an array of `jsonnetfile.json` imports. I currently render this with `update-index.sh`, which finds all `jsonnetfile.json` in `~/git` for me to construct a nice index.
## install
Generate `_jb`:
```
./update-index.sh
./install.sh
```
Symlink the compdef:
```
ln -sfn $PWD/_jb ~/.zsh/zsh-completions
```
Update `fpath` and load `compinit`:
```
fpath=($HOME/.zsh-completions $fpath)
autoload -U compinit
compinit
```