mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
add crystal plugin
This commit is contained in:
parent
d646884add
commit
9f922c43c7
2 changed files with 55 additions and 0 deletions
29
plugins/crystal/README.md
Normal file
29
plugins/crystal/README.md
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Crystal plugin
|
||||||
|
|
||||||
|
This plugin adds aliases for common commands used in dealing with [Crystal](https://crystal-lang.org) and [Crystal shards](https://crystal-lang.org/reference/the_shards_command/index.html) - package manager.
|
||||||
|
|
||||||
|
To use it, add `crystal` to the plugins array in your zshrc file:
|
||||||
|
|
||||||
|
```zsh
|
||||||
|
plugins=(... crystal)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Aliases
|
||||||
|
|
||||||
|
| Alias | Command | Description |
|
||||||
|
|:------|:--------------------------|:---------------------------------------------------------------|
|
||||||
|
| cry | `crystal` | language executable. |
|
||||||
|
| cryb | `crystal build` | build an executable. |
|
||||||
|
| crybr | `crystal build --release` | build an executable (Compile in release mode). |
|
||||||
|
| cryr | `crystal run` | build and run program. |
|
||||||
|
| cryrr | `crystal run --release` | build and run program (Compile in release mode). |
|
||||||
|
| crys | `crystal spec` | build and run specs. |
|
||||||
|
| crysr | `crystal spec --release` | build and run specs (Compile in release mode). |
|
||||||
|
| sha | `shards` | shard executable. |
|
||||||
|
| shac | `shards check` | Verify all dependencies are installed. |
|
||||||
|
| shai | `shards install` | Install dependencies, creating or using the `shard.lock` file. |
|
||||||
|
| shal | `shards list` | List installed dependencies. |
|
||||||
|
| shao | `shards outdated` | List dependencies that are outdated. |
|
||||||
|
| shap | `shards prune` | Remove unused dependencies from `lib` folder. |
|
||||||
|
| shau | `shards update` | Update dependencies and `shard.lock`. |
|
||||||
|
| shav | `shards version` | Print the current version of the shard. |
|
26
plugins/crystal/crystal.plugin.zsh
Normal file
26
plugins/crystal/crystal.plugin.zsh
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
# General
|
||||||
|
|
||||||
|
alias cry="crystal"
|
||||||
|
|
||||||
|
# Build
|
||||||
|
|
||||||
|
alias cryb="crystal build"
|
||||||
|
alias crybr="crystal build --release"
|
||||||
|
|
||||||
|
# Run
|
||||||
|
alias cryr="crystal run"
|
||||||
|
alias cryrr="crystal run --release"
|
||||||
|
|
||||||
|
# Spec
|
||||||
|
alias crys="crystal spec --order rando"
|
||||||
|
alias crysu="crystal spec"
|
||||||
|
|
||||||
|
# Shards
|
||||||
|
alias sha="shards"
|
||||||
|
alias shac="shards check"
|
||||||
|
alias shai="shards install"
|
||||||
|
alias shal="shards list"
|
||||||
|
alias shao="shards outdated"
|
||||||
|
alias shap="shards prune"
|
||||||
|
alias shau="shards update"
|
||||||
|
alias shav="shards version"
|
Loading…
Reference in a new issue