#compdef lbin # Zsh completion for lbin # Source this file or add to fpath: . lbin-completion.zsh _lbin() { local -a commands commands=( 'f:Upload a file (short for file)' 'file:Upload a file and get a link' 'o:Upload oneshot file (short for oneshot)' 'oneshot:Upload a file with one-time use link' 'u:Shorten URL (short for url)' 'url:Generate a shortened URL' 'ou:Oneshot URL (short for oneshot_url)' 'oneshot_url:Generate a one-time use shortened URL' 'r:Remote file (short for remote)' 'remote:Paste file from remote URL' 'help:Show help message' ) _arguments -C \ '1:command:->command' \ '2:argument:->argument' \ && return 0 case "$state" in command) _describe -t commands 'lbin commands' commands _files ;; argument) case "${words[2]}" in f|file|o|oneshot) _files ;; u|url|ou|oneshot_url|r|remote) _message 'URL' ;; esac ;; esac } _lbin "$@"