Skip to content

Instantly share code, notes, and snippets.

@ocean90
Last active December 11, 2020 09:27
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ocean90/3e5da3c526c66144eab3a78b0101b2ec to your computer and use it in GitHub Desktop.
Save ocean90/3e5da3c526c66144eab3a78b0101b2ec to your computer and use it in GitHub Desktop.
zsh completion for assh
#compdef assh
# assh autocompletion for oh-my-zsh
# Requires: assh installed
# Author: Dominik Schilling (@ocean90)
# Install:
# Copy the file to ~/.oh-my-zsh/plugins/assh/_assh and add assh to the plugins list in your ~/.zshrc file.
# Resources:
# https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/tmux-cssh/_tmux-cssh
# https://github.com/zsh-users/zsh/blob/master/Completion/Unix/Command/_ssh
# https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org
_arguments \
'(-c --config)'{-c,--config=}'[location of config file]:filename:_files' \
'(-D --debug)'{-D,--debug}'[debug mode]' \
'(-V --verbose)'{-V,--verbose}'[verbose mode]' \
'(-h --help)'{-h,--help}'[show help]' \
'(-v --version)'{-v,--version}'[print the version]' \
'*:host:_hosts' && return 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment