mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh
This commit is contained in:
commit
55be80b0bd
2 changed files with 37 additions and 1 deletions
|
|
@ -52,7 +52,9 @@ git_prompt_status() {
|
||||||
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then
|
if $(echo "$INDEX" | grep '^R ' &> /dev/null); then
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
|
STATUS="$ZSH_THEME_GIT_PROMPT_RENAMED$STATUS"
|
||||||
fi
|
fi
|
||||||
if $(echo "$INDEX" | grep '^D ' &> /dev/null); then
|
if $(echo "$INDEX" | grep '^ D ' &> /dev/null); then
|
||||||
|
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
||||||
|
elif $(echo "$INDEX" | grep '^AD ' &> /dev/null); then
|
||||||
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
STATUS="$ZSH_THEME_GIT_PROMPT_DELETED$STATUS"
|
||||||
fi
|
fi
|
||||||
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
if $(echo "$INDEX" | grep '^UU ' &> /dev/null); then
|
||||||
|
|
|
||||||
34
plugins/gas/_gas
Normal file
34
plugins/gas/_gas
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
#compdef gas
|
||||||
|
|
||||||
|
local curcontext="$curcontext" state line cmds ret=1
|
||||||
|
|
||||||
|
_arguments -C \
|
||||||
|
'(- 1 *)'{-v,--version}'[display version information]' \
|
||||||
|
'(-h|--help)'{-h,--help}'[show help information]' \
|
||||||
|
'1: :->cmds' \
|
||||||
|
'*: :->args' && ret=0
|
||||||
|
|
||||||
|
case $state in
|
||||||
|
cmds)
|
||||||
|
cmds=(
|
||||||
|
"version:Prints Gas's version"
|
||||||
|
"use:Uses author"
|
||||||
|
"show:Shows your current user"
|
||||||
|
"list:Lists your authors"
|
||||||
|
"import:Imports current user to gasconfig"
|
||||||
|
"help:Describe available tasks or one specific task"
|
||||||
|
"delete:Deletes author"
|
||||||
|
"add:Adds author to gasconfig"
|
||||||
|
)
|
||||||
|
_describe -t commands 'gas command' cmds && ret=0
|
||||||
|
;;
|
||||||
|
args)
|
||||||
|
case $line[1] in
|
||||||
|
(use|delete)
|
||||||
|
_values -S , 'authors' $(cat ~/.gas | sed -n -e 's/^\[\(.*\)\]/\1/p') && ret=0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
return ret
|
||||||
Loading…
Add table
Add a link
Reference in a new issue