Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh
Browse files Browse the repository at this point in the history
  • Loading branch information
balkian committed Jan 13, 2013
2 parents 717e567 + cf03ee6 commit 2c7f2f0
Show file tree
Hide file tree
Showing 9 changed files with 48 additions and 28 deletions.
16 changes: 9 additions & 7 deletions lib/git.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@ function git_prompt_info() {
# Checks if working tree is dirty
parse_git_dirty() {
local SUBMODULE_SYNTAX=''
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then
if [[ $POST_1_7_2_GIT -gt 0 ]]; then
SUBMODULE_SYNTAX="--ignore-submodules=dirty"
fi
if [[ -n $(git status -s ${SUBMODULE_SYNTAX} 2> /dev/null) ]]; then
echo "$ZSH_THEME_GIT_PROMPT_DIRTY"
else
echo "$ZSH_THEME_GIT_PROMPT_CLEAN"
fi
fi
}

Expand Down
2 changes: 0 additions & 2 deletions lib/termsupport.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ function title {
fi
if [[ "$TERM" == screen* ]]; then
print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars
elif [[ "$TERM_PROGRAM" == "Apple_Terminal" ]]; then
print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)
elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
print -Pn "\e]2;$2:q\a" #set window name
print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal)
Expand Down
1 change: 1 addition & 0 deletions plugins/bundler/bundler.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ _run-with-bundler() {

## Main program
for cmd in $bundled_commands; do
eval "function unbundled_$cmd () { $cmd \$@ }"
eval "function bundled_$cmd () { _run-with-bundler $cmd \$@}"
alias $cmd=bundled_$cmd

Expand Down
4 changes: 3 additions & 1 deletion plugins/encode64/encode64.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
encode64(){ echo -n $1 | base64 }
decode64(){ echo -n $1 | base64 -D }
decode64(){ echo -n $1 | base64 -D }
alias e64=encode64
alias d64=decode64
14 changes: 14 additions & 0 deletions plugins/lein/lein.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,29 @@ function _lein_commands() {
case $state in
subcommand)
subcommands=(
"classpath:print the classpath of the current project"
"clean:remove compiled files and dependencies from project"
"compile:ahead-of-time compile the project"
"deploy:build jar and deploy to remote repository"
"deps:download and install all dependencies"
"help:display a list of tasks or help for a given task"
"install:install the project and its dependencies in your local repository"
"int:enter an interactive task shell"
"interactive:enter an interactive task shell"
"jack-in:jack in to a clojure slime session from emacs."
"jar:create a jar file containing the compiled .class files"
"javac:compile java source files"
"new:create a new project skeleton"
"plugin:manage user-level plugins"
"pom:write a pom.xml file to disk for maven interop"
"repl:start a repl session either with the current project or standalone"
"retest:run only the test namespaces which failed last time around"
"run:run the project's -main function"
"search:search remote maven repositories for matching jars"
"swank:launch swank server for Emacs to connect"
"test:run the project's tests"
"test!:run a project's tests after cleaning and fetching dependencies"
"trampoline:run a task without nesting the project's JVM inside Leiningen's."
"uberjar:Create a jar including the contents of each of deps"
"upgrade:upgrade leiningen to the latest stable release"
"version:print leiningen's version"
Expand Down
4 changes: 1 addition & 3 deletions plugins/sprunge/sprunge.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ sprunge() {
fi
else
echo Using input from a pipe or STDIN redirection... >&2
while read -r line ; do
echo $line
done | curl -F 'sprunge=<-' http://sprunge.us
curl -F 'sprunge=<-' http://sprunge.us
fi
}
17 changes: 6 additions & 11 deletions plugins/vi-mode/vi-mode.plugin.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,13 @@
function zle-keymap-select zle-line-init zle-line-finish {
# The terminal must be in application mode when ZLE is active for $terminfo
# values to be valid.
if (( $+terminfo[smkx] && $+terminfo[rmkx] )); then
case "$0" in
(zle-line-init)
# Enable terminal application mode.
echoti smkx
;;
(zle-line-finish)
# Disable terminal application mode.
echoti rmkx
;;
esac
if (( ${+terminfo[smkx]} )); then
printf '%s' ${terminfo[smkx]}
fi
if (( ${+terminfo[rmkx]} )); then
printf '%s' ${terminfo[rmkx]}
fi

zle reset-prompt
zle -R
}
Expand Down
2 changes: 1 addition & 1 deletion themes/agnoster.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ prompt_dir() {
prompt_status() {
local symbols
symbols=()
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}$RETVAL"
[[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}"
[[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
[[ $(jobs -l | wc -l) -gt 0 ]] && symbols+="%{%F{cyan}%}⚙"

Expand Down
16 changes: 13 additions & 3 deletions themes/blinks.zsh-theme
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,23 @@ function _prompt_char() {
fi
}

# This theme works with both the "dark" and "light" variants of the
# Solarized color schema. Set the SOLARIZED_THEME variable to one of
# these two values to choose. If you don't specify, we'll assume you're
# using the "dark" variant.

case ${SOLARIZED_THEME:-dark} in
light) bkg=white;;
*) bkg=black;;
esac

ZSH_THEME_GIT_PROMPT_PREFIX=" [%{%B%F{blue}%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{black}%B%F{green}%}]"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{%f%k%b%K{${bkg}}%B%F{green}%}]"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{%F{red}%}*%{%f%k%b%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""

PROMPT='%{%f%k%b%}
%{%K{black}%B%F{green}%}%n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{black}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%}
%{%K{black}%}$(_prompt_char)%{%K{black}%} %#%{%f%k%b%} '
%{%K{${bkg}}%B%F{green}%}%n%{%B%F{blue}%}@%{%B%F{cyan}%}%m%{%B%F{green}%} %{%b%F{yellow}%K{${bkg}}%}%~%{%B%F{green}%}$(git_prompt_info)%E%{%f%k%b%}
%{%K{${bkg}}%}$(_prompt_char)%{%K{${bkg}}%} %#%{%f%k%b%} '

RPROMPT='!%{%B%F{cyan}%}%!%{%f%k%b%}'

0 comments on commit 2c7f2f0

Please sign in to comment.