Skip to content

Commit 6a344e6

Browse files
committed
Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh
2 parents 3e1a721 + a738ca9 commit 6a344e6

File tree

2 files changed

+37
-1
lines changed

2 files changed

+37
-1
lines changed

lib/git.zsh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@ git_prompt_status() {
5252
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then
5353
STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
5454
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
5658
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
5759
fi
5860
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then

plugins/gas/_gas

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
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

0 commit comments

Comments
 (0)