diff options
-rw-r--r-- | lib/git.zsh | 8 | ||||
-rw-r--r-- | plugins/battery/battery.plugin.zsh | 12 | ||||
-rw-r--r-- | plugins/bundler/bundler.plugin.zsh | 2 | ||||
-rw-r--r-- | plugins/git-remote-branch/git-remote-branch.plugin.zsh | 3 | ||||
-rw-r--r-- | plugins/mvn/mvn.plugin.zsh | 2 | ||||
-rw-r--r-- | templates/zshrc.zsh-template | 5 |
6 files changed, 24 insertions, 8 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.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..58f193550 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -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) |