From d180552560d91335e0b9a78954a910b4da55c3ec Mon Sep 17 00:00:00 2001 From: Michael Bianco Date: Fri, 26 Jan 2024 10:05:30 -0700 Subject: [PATCH] feat: railway zsh plugin --- README.md | 16 ++++++++++++++-- railway.plugin.zsh | 4 ++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 railway.plugin.zsh diff --git a/README.md b/README.md index 832ef7c59..41ff2a3c7 100644 --- a/README.md +++ b/README.md @@ -28,7 +28,7 @@ cargo install railwayapp --locked ### Homebrew -```bash +```bash brew tap railwayapp/railway brew install railway ``` @@ -40,7 +40,7 @@ npm install -g @railway/cli ### Bash ```bash -# Install +# Install bash <(curl -fsSL cli.new) # Uninstall @@ -52,6 +52,18 @@ bash <(curl -fsSL cli.new) -r scoop install railway ``` +### Zsh Shell Completion + +Add this to your zinit config (.zshrc): + +```shell +zinit light railway/cli + +# it also works with turbo mode: +zinit ice wait lucid +zinit load railway/cli +``` + ### From source See [CONTRIBUTING.md](https://github.com/railwayapp/cli/blob/master/CONTRIBUTING.md) for information on setting up this repo locally. diff --git a/railway.plugin.zsh b/railway.plugin.zsh new file mode 100644 index 000000000..b1866cbec --- /dev/null +++ b/railway.plugin.zsh @@ -0,0 +1,4 @@ +# make sure you execute this *after* asdf or other version managers are loaded +if (( $+commands[railway] )); then + eval "$(railway completion zsh)" +fi \ No newline at end of file