Skip to content

Instantly share code, notes, and snippets.

@AlephAlpha
Last active July 22, 2019 09:12
Show Gist options
  • Save AlephAlpha/e857b124b1393753d6252854f04be927 to your computer and use it in GitHub Desktop.
Save AlephAlpha/e857b124b1393753d6252854f04be927 to your computer and use it in GitHub Desktop.
zsh autocompletion for tealdeer, a tldr implementation in Rust (https://github.com/dbrgn/tealdeer )
#compdef tldr
_arguments : \
{-h,--help}'[Print the help message]' \
{-v,--version}'[Show version information]' \
{-l,--list}'[List all commands in the cache]' \
{-f,--render}'[Render a specific markdown file]:file:_files' \
{-o,--os}'[Override the operating system]:type:(linux osx sunos windows other)' \
{-u,--update}'[Update the local cache]' \
{-c,--clear-cache}'[Clear the local cache]' \
'--config-path[Show config file path]' \
'--seed-config[Create a basic config]' \
':: :_values "command" $(tldr -l | tr -d ,)'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment