summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/git.zsh8
-rw-r--r--plugins/battery/battery.plugin.zsh12
-rw-r--r--plugins/bundler/_bundler9
-rw-r--r--plugins/bundler/bundler.plugin.zsh2
-rw-r--r--plugins/git-remote-branch/git-remote-branch.plugin.zsh3
-rw-r--r--plugins/mvn/mvn.plugin.zsh2
-rw-r--r--templates/zshrc.zsh-template7
7 files changed, 34 insertions, 9 deletions
diff --git a/lib/git.zsh b/lib/git.zsh
index 76fe9b142..b023c9ac3 100644
--- a/lib/git.zsh
+++ b/lib/git.zsh
@@ -15,12 +15,18 @@ parse_git_dirty() {
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
- GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
+ if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" != "true" ]]; then
+ GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1)
+ else
+ GIT_STATUS=$(git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null | tail -n1)
+ fi
if [[ -n $GIT_STATUS && "$GIT_STATUS" != "$CLEAN_MESSAGE" ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
+ else
+ echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
}
diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh
index 95f890632..0c7c9421f 100644
--- a/plugins/battery/battery.plugin.zsh
+++ b/plugins/battery/battery.plugin.zsh
@@ -10,12 +10,16 @@
if [[ $(uname) == "Darwin" ]] ; then
+ function battery_pct() {
+ typeset -F maxcapacity=$(ioreg -rc "AppleSmartBattery"| grep '^.*"MaxCapacity"\ =\ ' | sed -e 's/^.*"MaxCapacity"\ =\ //')
+ typeset -F currentcapacity=$(ioreg -rc "AppleSmartBattery"| grep '^.*"CurrentCapacity"\ =\ ' | sed -e 's/^.*CurrentCapacity"\ =\ //')
+ integer i=$(((currentcapacity/maxcapacity) * 100))
+ echo $i
+ }
+
function battery_pct_remaining() {
if [[ $(ioreg -rc AppleSmartBattery | grep -c '^.*"ExternalConnected"\ =\ No') -eq 1 ]] ; then
- typeset -F maxcapacity=$(ioreg -rc "AppleSmartBattery"| grep '^.*"MaxCapacity"\ =\ ' | sed -e 's/^.*"MaxCapacity"\ =\ //')
- typeset -F currentcapacity=$(ioreg -rc "AppleSmartBattery"| grep '^.*"CurrentCapacity"\ =\ ' | sed -e 's/^.*CurrentCapacity"\ =\ //')
- integer i=$(((currentcapacity/maxcapacity) * 100))
- echo $i
+ battery_pct
else
echo "External Power"
fi
diff --git a/plugins/bundler/_bundler b/plugins/bundler/_bundler
index 5d22cac9a..2ec3a5f9c 100644
--- a/plugins/bundler/_bundler
+++ b/plugins/bundler/_bundler
@@ -23,6 +23,7 @@ case $state in
"viz[Generate a visual representation of your dependencies]" \
"init[Generate a simple Gemfile, placed in the current directory]" \
"gem[Create a simple gem, suitable for development with bundler]" \
+ "clean[Cleans up unused gems in your bundler directory]" \
"help[Describe available tasks or one specific task]"
ret=0
;;
@@ -62,6 +63,14 @@ case $state in
exec)
_normal && ret=0
;;
+ clean)
+ _arguments \
+ '(--force)--force[forces clean even if --path is not set]' \
+ '(--dry-run)--dry-run[only print out changes, do not actually clean gems]' \
+ '(--no-color)--no-color[Disable colorization in output]' \
+ '(--verbose)--verbose[Enable verbose output mode]'
+ ret=0
+ ;;
(open|show)
_gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') )
if [[ $_gems != "" ]]; then
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
index bc21da134..a288cffcd 100644
--- a/plugins/bundler/bundler.plugin.zsh
+++ b/plugins/bundler/bundler.plugin.zsh
@@ -6,7 +6,7 @@ alias bu="bundle update"
# The following is based on https://github.com/gma/bundler-exec
-bundled_commands=(annotate cap capify cucumber foreman guard middleman nanoc rackup rainbows rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails puma)
+bundled_commands=(annotate cap capify cucumber foreman guard jekyll middleman nanoc rackup rainbows rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails puma)
## Functions
diff --git a/plugins/git-remote-branch/git-remote-branch.plugin.zsh b/plugins/git-remote-branch/git-remote-branch.plugin.zsh
index ff98cbf87..6c5ab8f70 100644
--- a/plugins/git-remote-branch/git-remote-branch.plugin.zsh
+++ b/plugins/git-remote-branch/git-remote-branch.plugin.zsh
@@ -6,7 +6,8 @@ _git_remote_branch() {
compadd create publish rename delete track
elif (( CURRENT == 3 )); then
# second arg: remote branch name
- compadd `git branch -r | grep -v HEAD | sed "s/.*\///" | sed "s/ //g"`
+ remotes=`git remote | tr '\n' '|' | sed "s/\|$//g"`
+ compadd `git branch -r | grep -v HEAD | sed "s/$remotes\///" | sed "s/ //g"`
elif (( CURRENT == 4 )); then
# third arg: remote name
compadd `git remote`
diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
index c2d8e7ed7..799f6fc8c 100644
--- a/plugins/mvn/mvn.plugin.zsh
+++ b/plugins/mvn/mvn.plugin.zsh
@@ -114,7 +114,7 @@ function listMavenCompletions {
# jboss
jboss:start jboss:stop jboss:deploy jboss:undeploy jboss:redeploy
# tomcat
- tomcat:start tomcat:stop tomcat:deploy tomcat:undeploy tomcat:undeploy
+ tomcat:start tomcat:stop tomcat:deploy tomcat:undeploy tomcat:redeploy
# tomcat6
tomcat6:run tomcat6:run-war tomcat6:run-war-only tomcat6:stop tomcat6:deploy tomcat6:undeploy
# tomcat7
diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
index 2ea9934af..55980fb08 100644
--- a/templates/zshrc.zsh-template
+++ b/templates/zshrc.zsh-template
@@ -17,7 +17,7 @@ ZSH_THEME="robbyrussell"
# Comment this out to disable bi-weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
-# Uncomment to change how many often would you like to wait before auto-updates occur? (in days)
+# Uncomment to change how often before auto-updates occur? (in days)
# export UPDATE_ZSH_DAYS=13
# Uncomment following line if you want to disable colors in ls
@@ -29,6 +29,11 @@ ZSH_THEME="robbyrussell"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
+# Uncomment following line if you want to disable marking untracked files under
+# VCS as dirty. This makes repository status check for large repositories much,
+# much faster.
+# DISABLE_UNTRACKED_FILES_DIRTY="true"
+
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)