Skip to content

Instantly share code, notes, and snippets.

@glidenote
Created May 2, 2012 06:12
Show Gist options
  • Select an option

  • Save glidenote/2574327 to your computer and use it in GitHub Desktop.

Select an option

Save glidenote/2574327 to your computer and use it in GitHub Desktop.
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