File tree Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Expand file tree Collapse file tree 2 files changed +37
-1
lines changed Original file line number Diff line number Diff line change @@ -52,7 +52,9 @@ git_prompt_status() {
52
52
if $( echo " $INDEX " | grep ' ^R ' & > /dev/null) ; then
53
53
STATUS=" $ZSH_THEME_GIT_PROMPT_RENAMED$STATUS "
54
54
fi
55
- if $( echo " $INDEX " | grep ' ^D ' & > /dev/null) ; then
55
+ if $( echo " $INDEX " | grep ' ^ D ' & > /dev/null) ; then
56
+ STATUS=" $ZSH_THEME_GIT_PROMPT_DELETED$STATUS "
57
+ elif $( echo " $INDEX " | grep ' ^AD ' & > /dev/null) ; then
56
58
STATUS=" $ZSH_THEME_GIT_PROMPT_DELETED$STATUS "
57
59
fi
58
60
if $( echo " $INDEX " | grep ' ^UU ' & > /dev/null) ; then
Original file line number Diff line number Diff line change
1
+ #compdef gas
2
+
3
+ local curcontext="$curcontext" state line cmds ret=1
4
+
5
+ _arguments -C \
6
+ '(- 1 *)'{-v,--version}'[display version information]' \
7
+ '(-h|--help)'{-h,--help}'[show help information]' \
8
+ '1: :->cmds' \
9
+ '*: :->args' && ret=0
10
+
11
+ case $state in
12
+ cmds)
13
+ cmds=(
14
+ "version:Prints Gas's version"
15
+ "use:Uses author"
16
+ "show:Shows your current user"
17
+ "list:Lists your authors"
18
+ "import:Imports current user to gasconfig"
19
+ "help:Describe available tasks or one specific task"
20
+ "delete:Deletes author"
21
+ "add:Adds author to gasconfig"
22
+ )
23
+ _describe -t commands 'gas command' cmds && ret=0
24
+ ;;
25
+ args)
26
+ case $line[1] in
27
+ (use|delete)
28
+ _values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0
29
+ ;;
30
+ esac
31
+ ;;
32
+ esac
33
+
34
+ return ret
You can’t perform that action at this time.
0 commit comments