Created
April 1, 2017 02:55
-
-
Save Petelin/f67974f2903315b4c77d23793fabbece 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
### in zsh config | |
compdef _go go | |
### 补全脚本 | |
(pycharm_ascle) [~]$ cat .fpath/_go | |
#compdef go | |
_1st_arguments=( | |
"test" | |
"dev" | |
"hotfix" | |
"hotfix1" | |
"hotfix2" | |
) | |
local label_subcommand="launchctl subcommand" | |
if (( CURRENT == 2 )); then | |
_describe -t commands "$label_subcommand" _1st_arguments | |
return 0 | |
fi | |
_2nd_arguments=( | |
"gaia" | |
"athena" | |
"plutus" | |
"zeus" | |
"kefu" | |
"hera" | |
"ascle" | |
"backend" | |
"mars" | |
"ship" | |
) | |
if (( CURRENT == 3 )); then | |
_describe -t commands "$label_subcommand" _2nd_arguments | |
return 0 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment