Created
May 8, 2012 13:59
-
-
Save oppara/2635282 to your computer and use it in GitHub Desktop.
Zshでサブコマンドとファイル名を手抜き補完する
This file contains hidden or 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 _hogecmd hoge | |
function _hogecmd { | |
local -a cmds | |
if (( CURRENT == 2 ));then | |
cmds=('init' 'update' 'upgrade' 'commit') | |
_describe -t commands "subcommand" cmds | |
else | |
_files | |
fi | |
return 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://blog.glidenote.com/blog/2012/05/03/zsh-completion/
やっていることは