Skip to content

Instantly share code, notes, and snippets.

@mw-mcw
Created October 13, 2018 10:32
Show Gist options
  • Save mw-mcw/97a3eb8422a9337c2311571469b82dd7 to your computer and use it in GitHub Desktop.
Save mw-mcw/97a3eb8422a9337c2311571469b82dd7 to your computer and use it in GitHub Desktop.
Add tab autocompletions via --help switch (zsh)

How to add tab autocompletions for any command that will accept the --help switch:

add compdef _gnu_generic [command] to .zshrc

For example cat --help.

compdef _gnu_generic cat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment