-
-
Save swdyh/2933058 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#compdef mad | |
_arguments \ | |
'(-U --update-self)'{-U,--update-self}'[update mad(1) itself]' \ | |
'(-u --update)'{-u,--update}'[update remote mad-pages]' \ | |
'(-v --version)'{-v,--version}'[output mad version]' \ | |
'(-h --help)'{-h,--help}'[output this help information]' \ | |
'(-l --list)'{-l,--list}'[list mad-pages]' \ | |
'-[read from stdin]' \ | |
'*:: :->' && return 0 | |
if (( CURRENT == 1 )); then | |
`mad -l | grep '^ \w' | sed 's/^/compadd /'` | |
_files -g "*.(md|markdown)" | |
return | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment