From 9f922c43c77c8c4b9e05ea9bc0f954c0a0fbd016 Mon Sep 17 00:00:00 2001 From: Marc Jeffrey Date: Fri, 14 May 2021 14:37:09 +0400 Subject: [PATCH 1/2] add crystal plugin --- plugins/crystal/README.md | 29 +++++++++++++++++++++++++++++ plugins/crystal/crystal.plugin.zsh | 26 ++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 plugins/crystal/README.md create mode 100644 plugins/crystal/crystal.plugin.zsh diff --git a/plugins/crystal/README.md b/plugins/crystal/README.md new file mode 100644 index 000000000..2558aaf28 --- /dev/null +++ b/plugins/crystal/README.md @@ -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. | diff --git a/plugins/crystal/crystal.plugin.zsh b/plugins/crystal/crystal.plugin.zsh new file mode 100644 index 000000000..355338899 --- /dev/null +++ b/plugins/crystal/crystal.plugin.zsh @@ -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" From 75c6c3b0e9392476901476e255509c9dcff2c76f Mon Sep 17 00:00:00 2001 From: Marc Jeffrey Date: Sat, 15 May 2021 22:08:37 +0400 Subject: [PATCH 2/2] fixed typo --- plugins/crystal/README.md | 34 +++++++++++++++--------------- plugins/crystal/crystal.plugin.zsh | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/plugins/crystal/README.md b/plugins/crystal/README.md index 2558aaf28..a1531c405 100644 --- a/plugins/crystal/README.md +++ b/plugins/crystal/README.md @@ -10,20 +10,20 @@ 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. | +| 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 --order random` | build and run specs (in random order). | +| crysu | `crystal spec` | build and run specs. | +| 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. | diff --git a/plugins/crystal/crystal.plugin.zsh b/plugins/crystal/crystal.plugin.zsh index 355338899..cc1ff9408 100644 --- a/plugins/crystal/crystal.plugin.zsh +++ b/plugins/crystal/crystal.plugin.zsh @@ -12,7 +12,7 @@ alias cryr="crystal run" alias cryrr="crystal run --release" # Spec -alias crys="crystal spec --order rando" +alias crys="crystal spec --order random" alias crysu="crystal spec" # Shards