Skip to content

Instantly share code, notes, and snippets.

@max-arnold
Last active January 11, 2022 22:07
Show Gist options
  • Save max-arnold/cf4e80347d24fdb3b38aa993d0f09172 to your computer and use it in GitHub Desktop.
Save max-arnold/cf4e80347d24fdb3b38aa993d0f09172 to your computer and use it in GitHub Desktop.

Revisions

  1. max-arnold renamed this gist Jan 11, 2022. 1 changed file with 10 additions and 1 deletion.
    11 changes: 10 additions & 1 deletion salt_zsh_completion.md → salt_zsh_bash_completion.md
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,5 @@
    # Zsh

    ```bash
    mkdir -p ~/.zsh/completions
    wget -q https://raw.githubusercontent.com/saltstack/salt/master/pkg/salt.zsh -O ~/.zsh/completions/_salt
    @@ -12,4 +14,11 @@ autoload -U compinit && compinit
    zstyle ':completion:*:salt(|-cp|-call|-run|-key):*' use-cache true
    ```

    See https://twitter.com/salttips for more details
    # Bash

    ```bash
    apt install bash-completion
    ln -s /usr/share/bash-completion/completions/salt-common /etc/bash_completion.d/salt
    source /etc/bash_completion
    ```
    See https://twitter.com/SaltTips/status/1480793784900370432 for more details
  2. max-arnold created this gist Dec 28, 2021.
    15 changes: 15 additions & 0 deletions salt_zsh_completion.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    ```bash
    mkdir -p ~/.zsh/completions
    wget -q https://raw.githubusercontent.com/saltstack/salt/master/pkg/salt.zsh -O ~/.zsh/completions/_salt
    sed -i'' -e 's/python2/python/' ~/.zsh/completions/_salt
    ```

    ```bash
    # ~/.zshrc
    fpath=(~/.zsh/completions $fpath)
    plugins=(zsh-completions)
    autoload -U compinit && compinit
    zstyle ':completion:*:salt(|-cp|-call|-run|-key):*' use-cache true
    ```

    See https://twitter.com/salttips for more details