https://github.com/carlosedp/mill-zsh-completions
Zsh plugin adding Scala Mill build tool completions and prompt display
https://github.com/carlosedp/mill-zsh-completions
mill p10k scala zsh
Last synced: 3 months ago
JSON representation
Zsh plugin adding Scala Mill build tool completions and prompt display
- Host: GitHub
- URL: https://github.com/carlosedp/mill-zsh-completions
- Owner: carlosedp
- License: mit
- Created: 2023-10-05T13:31:36.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-24T12:25:42.000Z (about 1 year ago)
- Last Synced: 2024-10-27T23:14:24.099Z (about 1 year ago)
- Topics: mill, p10k, scala, zsh
- Language: Shell
- Homepage:
- Size: 84 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
- awesome-zsh-plugins - mill - Tab completions for Scala's [Mill](http://mill-build.com/) build tool. (Completions / ZSH on Windows)
- fucking-awesome-zsh-plugins - mill - Tab completions for Scala's [Mill](http://mill-build.com/) build tool. (Completions / ZSH on Windows)
README
# Scala Mill Build Tool Completion script for ZSH
This plugin adds Scala [Mill build tool](http://mill-build.com/mill/Intro_to_Mill.html) completion capabilities to zsh shell.
It can be used as `./mill ` that lists all modules, root level tasks and flags or
`./mill mymodule.` showing tasks for specific module. It works with deeper tasks as well like `./mill mymodule.test `.
The dots between modules and tasks are smartly added. The mill build data is cached for faster execution after the initial run. The cache is invalidated if `build.sc` or `build.mill` is changed. For aliases, check my plugin.
[](https://asciinema.org/a/AxkSqsYvz0god8sZWzfD4Dmva)
It also adds to [P10K](https://github.com/romkatv/powerlevel10k) Zsh theme the current Mill version for the project dir and if there are updates to Mill.

There is also a convenience function `millupd` to allow updating the current project Mill version. It updates `.mill-version` with latest stable version or if called with `-s` argument it updates to latest snapshot version.
## Installation
### For Oh-My-Zsh
```sh
cd "$HOME/.oh-my-zsh/custom/plugins" && git clone https://github.com/carlosedp/mill-zsh-completions.git
```
Add mill-zsh-completions to plugins array in ~/.zshrc
```txt
plugins=(
aliases
autojump
mill-zsh-completions
...
```
### For Zinit
~/.zshrc
source "$HOME/.zinit/bin/zinit.zsh"
zinit ice lucid nocompile
zinit load carlosedp/mill-zsh-completions
### Installing without a framework
```sh
git clone https://github.com/carlosedp/mill-zsh-completions.git
```
And source mill-zsh-completions.plugin.zsh or add code to zshrc or any startup script
## Using P10k theme prompt element
To use the P10K prompt element, add `mill_version` to the `p10k.zsh` file as in:
```shell
# typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
# status # already exists
# ...
# mill_version
# ...
```