From d02a3912cfd52636ad547fe0b1357303b77584a8 Mon Sep 17 00:00:00 2001 From: Fredrik Appelberg Date: Wed, 1 Dec 2010 09:56:54 +0100 Subject: [PATCH 01/58] maven plugin --- plugins/mvn/mvn.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/mvn/mvn.plugin.zsh diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh new file mode 100644 index 00000000..abd0da18 --- /dev/null +++ b/plugins/mvn/mvn.plugin.zsh @@ -0,0 +1,6 @@ +function listMavenCompletions { + reply=( + cli:execute cli:execute-phase archetype:generate compile clean install test test-compile deploy package cobertura:cobertura jetty:run gwt:run gwt:debug -DskipTests -Dmaven.test.skip=true -DarchetypeCatalog=http://tapestry.formos.com/maven-snapshot-repository -Dtest= `if [ -d ./src ] ; then find ./src -type f | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dtest=\1?' ; fi`); +} + +compctl -K listMavenCompletions mvn \ No newline at end of file From 792e50c917b7c854fbcadbce10a895ab7fbaa7ec Mon Sep 17 00:00:00 2001 From: Fredrik Appelberg Date: Wed, 16 Feb 2011 10:40:51 +0100 Subject: [PATCH 02/58] mvn plugin --- plugins/mvn/mvn.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index abd0da18..e8af2f49 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -1,6 +1,6 @@ function listMavenCompletions { reply=( - cli:execute cli:execute-phase archetype:generate compile clean install test test-compile deploy package cobertura:cobertura jetty:run gwt:run gwt:debug -DskipTests -Dmaven.test.skip=true -DarchetypeCatalog=http://tapestry.formos.com/maven-snapshot-repository -Dtest= `if [ -d ./src ] ; then find ./src -type f | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dtest=\1?' ; fi`); + cli:execute cli:execute-phase archetype:generate generate-sources compile clean install test test-compile deploy package cobertura:cobertura jetty:run gwt:run gwt:debug -DskipTests -Dmaven.test.skip=true -DarchetypeCatalog=http://tapestry.formos.com/maven-snapshot-repository -Dtest= `if [ -d ./src ] ; then find ./src -type f | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dtest=\1?' ; fi`); } compctl -K listMavenCompletions mvn \ No newline at end of file From 0504a01012b88e6eb74040ed599bddf29163fd69 Mon Sep 17 00:00:00 2001 From: Fredrik Appelberg Date: Mon, 7 Mar 2011 13:49:30 +0100 Subject: [PATCH 03/58] .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8d19d100..2cf59326 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,5 @@ locals.zsh log/.zsh_history projects.zsh custom/* -!custom/example.zsh \ No newline at end of file +!custom/example.zshcache +cache/ From c2e8bed253d25699f826fd7b65d965944b42a21c Mon Sep 17 00:00:00 2001 From: Fredrik Appelberg Date: Mon, 7 Mar 2011 14:22:06 +0100 Subject: [PATCH 04/58] Added a plugin for GNU Screen. --- plugins/screen/screen.plugin.zsh | 54 ++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 plugins/screen/screen.plugin.zsh diff --git a/plugins/screen/screen.plugin.zsh b/plugins/screen/screen.plugin.zsh new file mode 100644 index 00000000..ba7ac67e --- /dev/null +++ b/plugins/screen/screen.plugin.zsh @@ -0,0 +1,54 @@ +# if using GNU screen, let the zsh tell screen what the title and hardstatus +# of the tab window should be. +if [[ $TERM == "screen" ]]; then + if [[ $_GET_PATH == '' ]]; then + _GET_PATH='echo $PWD | sed "s/^\/Users\//~/;s/^~$USER/~/"' + fi + if [[ $_GET_HOST == '' ]]; then + _GET_HOST='echo $HOST | sed "s/\..*//"' + fi + + # use the current user as the prefix of the current tab title + TAB_TITLE_PREFIX='"`'$_GET_HOST'`:`'$_GET_PATH' | sed "s:..*/::"`$PROMPT_CHAR"' + # when at the shell prompt, show a truncated version of the current path (with + # standard ~ replacement) as the rest of the title. + TAB_TITLE_PROMPT='$SHELL:t' + # when running a command, show the title of the command as the rest of the + # title (truncate to drop the path to the command) + TAB_TITLE_EXEC='$cmd[1]:t' + + # use the current path (with standard ~ replacement) in square brackets as the + # prefix of the tab window hardstatus. + TAB_HARDSTATUS_PREFIX='"[`'$_GET_PATH'`] "' + # when at the shell prompt, use the shell name (truncated to remove the path to + # the shell) as the rest of the title + TAB_HARDSTATUS_PROMPT='$SHELL:t' + # when running a command, show the command name and arguments as the rest of + # the title + TAB_HARDSTATUS_EXEC='$cmd' + + # tell GNU screen what the tab window title ($1) and the hardstatus($2) should be + function screen_set() + { + # set the tab window title (%t) for screen + print -nR $'\033k'$1$'\033'\\\ + + # set hardstatus of tab window (%h) for screen + print -nR $'\033]0;'$2$'\a' + } + # called by zsh before executing a command + function preexec() + { + local -a cmd; cmd=(${(z)1}) # the command string + eval "tab_title=$TAB_TITLE_PREFIX:$TAB_TITLE_EXEC" + eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_EXEC" + screen_set $tab_title $tab_hardstatus + } + # called by zsh before showing the prompt + function precmd() + { + eval "tab_title=$TAB_TITLE_PREFIX:$TAB_TITLE_PROMPT" + eval "tab_hardstatus=$TAB_HARDSTATUS_PREFIX:$TAB_HARDSTATUS_PROMPT" + screen_set $tab_title $tab_hardstatus + } +fi \ No newline at end of file From d807221f607cc7ef02e17a9aa60b1f5f18a886ab Mon Sep 17 00:00:00 2001 From: Fredrik Appelberg Date: Mon, 7 Mar 2011 14:36:12 +0100 Subject: [PATCH 05/58] fix to avoid parse errors if $TERM is empty --- lib/termsupport.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index e1e53669..d7c2b9de 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -5,7 +5,7 @@ function title { if [[ "$TERM" == "screen" ]]; then print -Pn "\ek$1\e\\" #set screen hardstatus, usually truncated at 20 chars - elif [[ ($TERM =~ "^xterm") ]] || [[ ($TERM == "rxvt") ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then + elif [[ ("$TERM" =~ "^xterm") ]] || [[ ("$TERM" == "rxvt") ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then print -Pn "\e]2;$2\a" #set window name print -Pn "\e]1;$1\a" #set icon (=tab) name (will override window name on broken terminal) fi From f1af41589960f7fc98d270c70a80b351b703e53e Mon Sep 17 00:00:00 2001 From: Fredrik Appelberg Date: Wed, 9 Mar 2011 12:19:01 +0100 Subject: [PATCH 06/58] figuring out home dir on unix systems as well --- plugins/screen/screen.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/screen/screen.plugin.zsh b/plugins/screen/screen.plugin.zsh index ba7ac67e..98178e80 100644 --- a/plugins/screen/screen.plugin.zsh +++ b/plugins/screen/screen.plugin.zsh @@ -2,7 +2,7 @@ # of the tab window should be. if [[ $TERM == "screen" ]]; then if [[ $_GET_PATH == '' ]]; then - _GET_PATH='echo $PWD | sed "s/^\/Users\//~/;s/^~$USER/~/"' + _GET_PATH='echo $PWD | sed "s/^\/Users\//~/;s/^\/home\//~/;s/^~$USER/~/"' fi if [[ $_GET_HOST == '' ]]; then _GET_HOST='echo $HOST | sed "s/\..*//"' From d693711f1419c4c4da1da8eca35c1d983bb42ab0 Mon Sep 17 00:00:00 2001 From: Alex Light Date: Tue, 28 Feb 2012 13:52:57 -0500 Subject: [PATCH 07/58] made the 'd' alias only show the directories that can be cd'ed to using the number aliases --- lib/directories.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/directories.zsh b/lib/directories.zsh index bb114f61..a787db9e 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -36,9 +36,9 @@ cd () { alias md='mkdir -p' alias rd=rmdir -alias d='dirs -v' +alias d='dirs -v | head -10' # mkdir & cd to it function mcd() { mkdir -p "$1" && cd "$1"; -} \ No newline at end of file +} From f8802bd61216b7636b9065efe5441479d3e4f7fd Mon Sep 17 00:00:00 2001 From: Rotem Yaari Date: Thu, 26 Jan 2012 22:25:51 +0200 Subject: [PATCH 08/58] Add dircycle plugin: enables cycling through the directory stack --- plugins/dircycle/dircycle.plugin.zsh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 plugins/dircycle/dircycle.plugin.zsh diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh new file mode 100644 index 00000000..46a0ab26 --- /dev/null +++ b/plugins/dircycle/dircycle.plugin.zsh @@ -0,0 +1,10 @@ +## +# dircycle plugin: enables cycling through the directory +# stack using Ctrl+Shift+Left/Right + +eval "insert-cycledleft () { zle push-line; LBUFFER='pushd -q +1'; zle accept-line }" +zle -N insert-cycledleft +bindkey "\e[1;6D" insert-cycledleft +eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q -0'; zle accept-line }" +zle -N insert-cycledright +bindkey "\e[1;6C" insert-cycledright From 19bf83e17d90d64b9bb40f8fd4c36e660e4b17e3 Mon Sep 17 00:00:00 2001 From: Rotem Yaari Date: Sun, 29 Jan 2012 16:41:40 +0200 Subject: [PATCH 09/58] Pager is 'less -R' to support colored outputs --- lib/misc.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index 88732e66..0f7e7e92 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -9,5 +9,5 @@ bindkey "^[m" copy-prev-shell-word setopt long_list_jobs ## pager -export PAGER=less +export PAGER="less -R" export LC_CTYPE=$LANG From b1e4ef17543d4a236ad35417ac36560917e6cadc Mon Sep 17 00:00:00 2001 From: pomaxa Date: Thu, 1 Mar 2012 16:57:00 +0200 Subject: [PATCH 10/58] current repository action --- plugins/git/git.plugin.zsh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index e1d68250..d3d3f702 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -54,10 +54,16 @@ function current_branch() { echo ${ref#refs/heads/} } +function current_repository() { + + ref=$(git symbolic-ref HEAD 2> /dev/null) || return + echo $(git remote -v | cut -d':' -f 2) +} + # these aliases take advantage of the previous function alias ggpull='git pull origin $(current_branch)' compdef ggpull=git alias ggpush='git push origin $(current_branch)' compdef ggpush=git alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)' -compdef ggpnp=git \ No newline at end of file +compdef ggpnp=git From c7105a53416866e8315c503546dc5bfe2b9da83f Mon Sep 17 00:00:00 2001 From: Jeffrey Dileo Date: Wed, 7 Mar 2012 07:47:34 -0500 Subject: [PATCH 11/58] Disabled title function for emacs term mode --- lib/termsupport.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 22198950..e26fef6d 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -3,7 +3,9 @@ #Fully support screen, iterm, and probably most modern xterm and rxvt #Limited support for Apple Terminal (Terminal can't set window or tab separately) function title { - [ "$DISABLE_AUTO_TITLE" != "true" ] || return + if [[ "$DISABLE_AUTO_TITLE" == "true" ]] || [[ "$EMACS" == *term* ]]; then + return + fi if [[ "$TERM" == screen* ]]; then print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then From db27635d8b4cb60f4d3594893e53777179d00d43 Mon Sep 17 00:00:00 2001 From: Vitaliy Yanchuk Date: Fri, 16 Mar 2012 14:10:37 +0200 Subject: [PATCH 12/58] Plugin for encoding strings into base64 and decoding them --- plugins/encode64/encode64.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 plugins/encode64/encode64.plugin.zsh diff --git a/plugins/encode64/encode64.plugin.zsh b/plugins/encode64/encode64.plugin.zsh new file mode 100644 index 00000000..cfb7c6a1 --- /dev/null +++ b/plugins/encode64/encode64.plugin.zsh @@ -0,0 +1,2 @@ +encode64(){ echo -n $1 | base64 } +decode64(){ echo -n $1 | base64 -D } \ No newline at end of file From 5f72c6313643f3e627394c540192b77781c08178 Mon Sep 17 00:00:00 2001 From: Mat Schaffer Date: Sat, 17 Mar 2012 22:03:01 -0300 Subject: [PATCH 13/58] Don't clobber standard Esc+. behavior Esc+. works as "last arg" on both bash and zsh. Seems like a shame to introduce a new standard. --- lib/key-bindings.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 5c1b90bf..5f499f3e 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -3,7 +3,6 @@ bindkey -e bindkey '\ew' kill-region bindkey -s '\el' "ls\n" -bindkey -s '\e.' "..\n" bindkey '^r' history-incremental-search-backward bindkey "^[[5~" up-line-or-history bindkey "^[[6~" down-line-or-history From 60c3fa937120f38b1215a57889c8207989c9a7f1 Mon Sep 17 00:00:00 2001 From: dir01 Date: Thu, 22 Mar 2012 04:34:19 +0700 Subject: [PATCH 14/58] Python plugin: added pygrep command, simplified pyclean --- plugins/python/python.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/python/python.plugin.zsh b/plugins/python/python.plugin.zsh index 3ea34d71..8be3cd86 100644 --- a/plugins/python/python.plugin.zsh +++ b/plugins/python/python.plugin.zsh @@ -2,4 +2,7 @@ alias pyfind='find . -name "*.py"' # Remove python compiled byte-code -alias pyclean='find . -type f -name "*.py[co]" -exec rm -f \{\} \;' +alias pyclean='find . -type f -name "*.py[co]" -delete' + +# Grep among .py files +alias pygrep='grep --include="*.py"' From 12e181c6f6167adabb688f63418037c8c1949335 Mon Sep 17 00:00:00 2001 From: Daniel Lockard Date: Wed, 4 Apr 2012 13:04:00 -0500 Subject: [PATCH 15/58] Added an if-statement to see if git is installed --- tools/install.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index aedb706d..8ca427d2 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -5,7 +5,13 @@ then fi echo "\033[0;34mCloning Oh My Zsh...\033[0m" -/usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh +which git > /dev/null +if [[ $? -eq 0 ]]; then + /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh +else + echo "git not installed" + exit +fi echo "\033[0;34mLooking for an existing zsh config...\033[0m" if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] From e429a880e68982ce9ab0f35921174493fa3e4c03 Mon Sep 17 00:00:00 2001 From: ntpeters Date: Thu, 12 Apr 2012 06:04:24 -0300 Subject: [PATCH 16/58] Added yum aliases for: makecache, grouplist, groupinstall, and groupremove. --- plugins/yum/yum.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/yum/yum.plugin.zsh b/plugins/yum/yum.plugin.zsh index d6ba7ed6..c9966f1b 100644 --- a/plugins/yum/yum.plugin.zsh +++ b/plugins/yum/yum.plugin.zsh @@ -3,10 +3,14 @@ alias ys="yum search" # search package alias yp="yum info" # show package info alias yl="yum list" # list packages +alias ygl="yum grouplist" # list package groups alias yli="yum list installed" # print all installed packages +alias ymc="yum makecache # rebuilds the yum package list alias yu="sudo yum update" # upgrate packages alias yi="sudo yum install" # install package +alias ygi="sudo yum groupinstall" # install package group alias yr="sudo yum remove" # remove package +alias ygr="sudo yum groupremove" # remove pagage group alias yrl="sudo yum remove --remove-leaves" # remove package and leaves -alias yc="sudo yum clean all" # clean cache +alias yc="sudo yum clean all" # clean cache \ No newline at end of file From 5eb466a7886e1220584322a10964343a101ed1dc Mon Sep 17 00:00:00 2001 From: Dylan Hudson Date: Thu, 19 Apr 2012 00:14:55 -0700 Subject: [PATCH 17/58] added aliases for sublime text --- plugins/sublime/sublime.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 plugins/sublime/sublime.plugin.zsh diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh new file mode 100644 index 00000000..e0f6e052 --- /dev/null +++ b/plugins/sublime/sublime.plugin.zsh @@ -0,0 +1,3 @@ +# Sublime Text 2 Aliases +alias st='open -a "/Applications/Sublime Text 2.app"' +alias stt='st .' From 99a3c3c5c85b7a72037022607f41d682b77db7d7 Mon Sep 17 00:00:00 2001 From: Dylan Hudson Date: Sun, 22 Apr 2012 08:36:37 -0700 Subject: [PATCH 18/58] changed the alias to use to cli provided by sublime text --- plugins/sublime/sublime.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index e0f6e052..c42c68df 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -1,3 +1,3 @@ # Sublime Text 2 Aliases -alias st='open -a "/Applications/Sublime Text 2.app"' +alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl' alias stt='st .' From e2f7623534054645e849db42a0030a1642e5ba97 Mon Sep 17 00:00:00 2001 From: Mat Gadd Date: Thu, 3 May 2012 13:03:23 +0100 Subject: [PATCH 19/58] Don't drop everything after a trailing slash, as this breaks standard svn branches: ^/branches/featurename ^/releases/Release-vx.y ^/trunk --- plugins/svn/svn.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh index e2cf96ca..4d5bfb8d 100644 --- a/plugins/svn/svn.plugin.zsh +++ b/plugins/svn/svn.plugin.zsh @@ -16,7 +16,7 @@ function svn_get_repo_name { if [ $(in_svn) ]; then svn info | sed -n 's/Repository\ Root:\ .*\///p' | read SVN_ROOT - svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" | sed "s/\/.*$//" + svn info | sed -n "s/URL:\ .*$SVN_ROOT\///p" fi } From 51c55ad17e23db89e72424add0c34fa20654cd8f Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 6 May 2012 11:08:34 +0100 Subject: [PATCH 20/58] Suppress "zsh: no matches found" error when $ZSH_CUSTOM has no files The addition of `(.N)` enables the `NULL_GLOB` option which suppresses the error output in question. Reference: http://www.zsh.org/mla/users/2004/msg00621.html --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 732a403b..e360344b 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -51,7 +51,7 @@ for plugin ($plugins); do done # Load all of your custom configurations from custom/ -for config_file ($ZSH_CUSTOM/*.zsh) source $config_file +for config_file ($ZSH_CUSTOM/*.zsh(.N)) source $config_file # Load the theme if [ "$ZSH_THEME" = "random" ] From f9018c5efbb6cf164139009eff1863837d72b412 Mon Sep 17 00:00:00 2001 From: Jim Myhrberg Date: Sun, 6 May 2012 11:10:16 +0100 Subject: [PATCH 21/58] Load themes from `$ZSH_CUSTOM` instead of `$ZSH/custom` This seems like a simple oversight, everything else uses `$ZSH_CUSTOM` rather than `$ZSH/custom`. --- oh-my-zsh.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index e360344b..c2b6049c 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -65,12 +65,11 @@ then else if [ ! "$ZSH_THEME" = "" ] then - if [ -f "$ZSH/custom/$ZSH_THEME.zsh-theme" ] + if [ -f "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" ] then - source "$ZSH/custom/$ZSH_THEME.zsh-theme" + source "$ZSH_CUSTOM/$ZSH_THEME.zsh-theme" else source "$ZSH/themes/$ZSH_THEME.zsh-theme" fi fi fi - From adab18f1616956beb10419dc52b8d713d6b6c9e0 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Sun, 25 Mar 2012 00:00:05 +0200 Subject: [PATCH 22/58] Added suse plugins --- plugins/suse/suse.plugin.zsh | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 plugins/suse/suse.plugin.zsh diff --git a/plugins/suse/suse.plugin.zsh b/plugins/suse/suse.plugin.zsh new file mode 100644 index 00000000..d79308ca --- /dev/null +++ b/plugins/suse/suse.plugin.zsh @@ -0,0 +1,5 @@ +alias zi='sudo zypper install' +alias zrf='sudo zypper refresh' +alias zs='zypper search' +alias zup='sudo zypper dist-upgrade' +alias zrm='sudo zypper remove' From b4380aacb0a0a89618430b2bbb1221c602d43d62 Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Thu, 19 Apr 2012 13:49:15 +0300 Subject: [PATCH 23/58] Added zp and zps aliases for the SUSE plugin --- plugins/suse/suse.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/suse/suse.plugin.zsh b/plugins/suse/suse.plugin.zsh index d79308ca..d4628694 100644 --- a/plugins/suse/suse.plugin.zsh +++ b/plugins/suse/suse.plugin.zsh @@ -3,3 +3,5 @@ alias zrf='sudo zypper refresh' alias zs='zypper search' alias zup='sudo zypper dist-upgrade' alias zrm='sudo zypper remove' +alias zp='sudo zypper patch' +alias zps='sudo zypper ps' From 6f859c5837753a87544b2672678e36bcf167cc82 Mon Sep 17 00:00:00 2001 From: Varun Vijayaraghavan Date: Mon, 21 May 2012 10:42:12 -0400 Subject: [PATCH 24/58] Add Sublime Text 2 alias for Linux. Detects the platform using "uname", and sets the alias accordingly. If you are using Linux, this assumes that you have created a symbolic link to /usr/bin/sublime_text. --- plugins/sublime/sublime.plugin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index c42c68df..6825d6c0 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -1,3 +1,8 @@ # Sublime Text 2 Aliases -alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl' +#unamestr = 'uname' +if [[ uname == 'Linux' ]]; then + alias st='open -a /usr/bin/sublime_text' +elif [[ uname == 'Darwin' ]]; then + alias st='open -a "/Applications/Sublime Text 2.app' +fi alias stt='st .' From 61c39b50390a7869f22001a6cd65b7e8cd977e88 Mon Sep 17 00:00:00 2001 From: natsumesou Date: Wed, 23 May 2012 13:49:21 +0900 Subject: [PATCH 25/58] Load symlink custom files `(.)` search only real files. The deletion of it enables searching symlink *.zsh files --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index c2b6049c..ddef1ad6 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -51,7 +51,7 @@ for plugin ($plugins); do done # Load all of your custom configurations from custom/ -for config_file ($ZSH_CUSTOM/*.zsh(.N)) source $config_file +for config_file ($ZSH_CUSTOM/*.zsh(N)) source $config_file # Load the theme if [ "$ZSH_THEME" = "random" ] From 0f9fff8aecb154627b42a57cede37f7bd7b6c3ba Mon Sep 17 00:00:00 2001 From: Alexander Berezovsky Date: Wed, 23 May 2012 16:47:06 -0700 Subject: [PATCH 26/58] add fasd plugin --- plugins/fasd/fasd.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/fasd/fasd.plugin.zsh diff --git a/plugins/fasd/fasd.plugin.zsh b/plugins/fasd/fasd.plugin.zsh new file mode 100644 index 00000000..d42584f1 --- /dev/null +++ b/plugins/fasd/fasd.plugin.zsh @@ -0,0 +1,6 @@ +if [ $commands[fasd] ]; then # check if fasd is installed + eval "$(fasd --init auto)" + alias v='f -e vim' + alias o='a -e open' +fi + From 548f68d7f028acc70f4a9026a28161a604edc405 Mon Sep 17 00:00:00 2001 From: Alexander Berezovsky Date: Wed, 23 May 2012 17:03:18 -0700 Subject: [PATCH 27/58] fino-time theme --- themes/fino-time.zsh-theme | 39 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 themes/fino-time.zsh-theme diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme new file mode 100644 index 00000000..22c7a098 --- /dev/null +++ b/themes/fino-time.zsh-theme @@ -0,0 +1,39 @@ +# Fino-time theme by Aexander Berezovsky (http://berezovsky.me) based on Fino by Max Masnick (http://max.masnick.me) + +# Use with a dark background and 256-color terminal! +# Meant for people with RVM and git. Tested only on OS X 10.7. + +# You can set your computer name in the ~/.box-name file if you want. + +# Borrowing shamelessly from these oh-my-zsh themes: +# bira +# robbyrussell +# +# Also borrowing from http://stevelosh.com/blog/2010/02/my-extravagant-zsh-prompt/ + +function virtualenv_info { + [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') ' +} + +function prompt_char { + git branch >/dev/null 2>/dev/null && echo '±' && return + echo '○' +} + +function box_name { + [ -f ~/.box-name ] && cat ~/.box-name || hostname -s +} + + +local rvm_ruby='‹$(rvm-prompt i v g)›%{$reset_color%}' +local current_dir='${PWD/#$HOME/~}' +local git_info='$(git_prompt_info)' + + +PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%} ${rvm_ruby} %D - %* +╰─$(virtualenv_info)$(prompt_char) " + +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$FG[202]%}✘✘✘" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$FG[040]%}✔" From 8923694fb42393d063487203e803199b394bbb47 Mon Sep 17 00:00:00 2001 From: Varun Vijayaraghavan Date: Thu, 24 May 2012 11:33:19 -0400 Subject: [PATCH 28/58] Fixed a bug in checking the platform --- plugins/sublime/sublime.plugin.zsh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) mode change 100644 => 100755 plugins/sublime/sublime.plugin.zsh diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh old mode 100644 new mode 100755 index 6825d6c0..0035b1b2 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -1,8 +1,9 @@ # Sublime Text 2 Aliases #unamestr = 'uname' -if [[ uname == 'Linux' ]]; then - alias st='open -a /usr/bin/sublime_text' -elif [[ uname == 'Darwin' ]]; then - alias st='open -a "/Applications/Sublime Text 2.app' + +if [[ $('uname') == 'Linux' ]]; then + alias st='/usr/bin/sublime_text&' +elif [[ $('uname') == 'Darwin' ]]; then + alias st='open -a /Applications/Sublime Text 2.app' fi alias stt='st .' From 8de877d63222ed4effad7d52d68fccca2c01b6dd Mon Sep 17 00:00:00 2001 From: Amar Raja Date: Tue, 29 May 2012 10:20:49 +0200 Subject: [PATCH 29/58] Prevent the heroku command from being automatically bundle-exec'ed The heroku command should not be executed via bundler, see: https://github.com/heroku/heroku/issues/173 --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index e1f57123..2b80b76e 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 ey foreman guard heroku middleman nanoc rackup rainbows rails rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails) +bundled_commands=(annotate cap capify cucumber ey foreman guard middleman nanoc rackup rainbows rails rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails) ## Functions From 1876f1d5581e7b6907ead46a8371826db5eded49 Mon Sep 17 00:00:00 2001 From: mapc Date: Mon, 28 May 2012 23:14:51 +0200 Subject: [PATCH 30/58] Make the $apt_pref variable evaluatet at alias expansion by using single-quotes instad of double quotes --- plugins/debian/debian.plugin.zsh | 36 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index 16a5d54c..5b6e5cfd 100644 --- a/plugins/debian/debian.plugin.zsh +++ b/plugins/debian/debian.plugin.zsh @@ -40,20 +40,20 @@ alias ap='apt-cache policy' # superuser operations ###################################################### if [[ $use_sudo -eq 1 ]]; then # commands using sudo ####### - alias aac="sudo $apt_pref autoclean" - alias abd="sudo $apt_pref build-dep" - alias ac="sudo $apt_pref clean" - alias ad="sudo $apt_pref update" - alias adg="sudo $apt_pref update && sudo $apt_pref upgrade" - alias adu="sudo $apt_pref update && sudo $apt_pref dist-upgrade" + alias aac='sudo $apt_pref autoclean' + alias abd='sudo $apt_pref build-dep' + alias ac='sudo $apt_pref clean' + alias ad='sudo $apt_pref update' + alias adg='sudo $apt_pref update && sudo $apt_pref upgrade' + alias adu='sudo $apt_pref update && sudo $apt_pref dist-upgrade' alias afu='sudo apt-file update' - alias ag="sudo $apt_pref upgrade" - alias ai="sudo $apt_pref install" - alias ap="sudo $apt_pref purge" - alias ar="sudo $apt_pref remove" + alias ag='sudo $apt_pref upgrade' + alias ai='sudo $apt_pref install' + alias ap='sudo $apt_pref purge' + alias ar='sudo $apt_pref remove' # apt-get only - alias ads="sudo $apt_pref dselect-upgrade" + alias ads='sudo $apt_pref dselect-upgrade' # Install all .deb files in the current directory. # Warning: you will need to put the glob in single quotes if you use: @@ -67,18 +67,18 @@ if [[ $use_sudo -eq 1 ]]; then # commands using su ######### else - alias aac='su -ls "'"$apt_pref"' autoclean" root' + alias aac='su -ls \'$apt_pref autoclean\' root' abd() { cmd="su -lc '$apt_pref build-dep $@' root" print "$cmd" eval "$cmd" } - alias ac='su -ls "'"$apt_pref"' clean" root' - alias ad='su -lc "'"$apt_pref"' update" root' - alias adg='su -lc "'"$apt_pref"' update && aptitude safe-upgrade" root' - alias adu='su -lc "'"$apt_pref"' update && aptitude dist-upgrade" root' + alias ac='su -ls \'$apt_pref clean\' root' + alias ad='su -lc \'$apt_pref update\' root' + alias adg='su -lc \'$apt_pref update && aptitude safe-upgrade\' root' + alias adu='su -lc \'$apt_pref update && aptitude dist-upgrade\' root' alias afu='su -lc "apt-file update"' - alias ag='su -lc "'"$apt_pref"' safe-upgrade" root' + alias ag='su -lc \'$apt_pref safe-upgrade\' root' ai() { cmd="su -lc 'aptitude -P install $@' root" print "$cmd" @@ -118,7 +118,7 @@ alias mydeb='time dpkg-buildpackage -rfakeroot -us -uc' apt-copy() { print '#!/bin/sh'"\n" > apt-copy.sh - cmd="$apt_pref install " + cmd='$apt_pref install' for p in ${(f)"$(aptitude search -F "%p" --disable-columns \~i)"}; { cmd="${cmd} ${p}" From 0673425331fe997224bab9f90579c40cd14934f1 Mon Sep 17 00:00:00 2001 From: mapc Date: Mon, 28 May 2012 23:17:38 +0200 Subject: [PATCH 31/58] Add command to directly install the output of acs --- plugins/debian/debian.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh index 5b6e5cfd..39d3ef36 100644 --- a/plugins/debian/debian.plugin.zsh +++ b/plugins/debian/debian.plugin.zsh @@ -49,6 +49,9 @@ if [[ $use_sudo -eq 1 ]]; then alias afu='sudo apt-file update' alias ag='sudo $apt_pref upgrade' alias ai='sudo $apt_pref install' + # Install all packages given on the command line while using only the first word of each line: + # acs ... | ail + alias ail="sed -e 's/ */ /g' -e 's/ *//' | cut -s -d ' ' -f 1 | "' xargs sudo $apt_pref install' alias ap='sudo $apt_pref purge' alias ar='sudo $apt_pref remove' From 91b4758d8f5a910a60de783f15acb66acda68d7f Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Thu, 31 May 2012 09:52:53 -0700 Subject: [PATCH 32/58] Now with 50% less auto-updates. --- tools/check_for_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 524aa509..bbd705a1 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -23,7 +23,7 @@ then fi epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) - if [ $epoch_diff -gt 6 ] + if [ $epoch_diff -gt 13 ] then if [ "$DISABLE_UPDATE_PROMPT" = "true" ] then From c4608ba281147af564fc0979b63bc8b23f1e55fb Mon Sep 17 00:00:00 2001 From: Tim Littlemore Date: Fri, 1 Jun 2012 15:26:22 +0100 Subject: [PATCH 33/58] Removing ey command from bundled_commands. It is not usually bundled. --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 2b80b76e..1ca48089 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 ey foreman guard middleman nanoc rackup rainbows rails rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails) +bundled_commands=(annotate cap capify cucumber foreman guard middleman nanoc rackup rainbows rails rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails) ## Functions From a04484e546e330a9cd2130ee160a53ec4580a844 Mon Sep 17 00:00:00 2001 From: Weston Platter Date: Fri, 1 Jun 2012 19:11:53 -0400 Subject: [PATCH 34/58] rails3, added rgm = 'rails generate migration' --- plugins/rails3/rails3.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/rails3/rails3.plugin.zsh b/plugins/rails3/rails3.plugin.zsh index d4c7df65..237d0594 100644 --- a/plugins/rails3/rails3.plugin.zsh +++ b/plugins/rails3/rails3.plugin.zsh @@ -13,6 +13,7 @@ alias rd='_rails_command destroy' alias rdb='_rails_command dbconsole' alias rdbm='rake db:migrate db:test:clone' alias rg='_rails_command generate' +alias rgm='_rails_command generate migration' alias rp='_rails_command plugin' alias ru='_rails_command runner' alias rs='_rails_command server' From df30eae4121802f8ac800cb3e92c7d08356217a6 Mon Sep 17 00:00:00 2001 From: Erich Menge Date: Sun, 3 Jun 2012 12:44:14 -0500 Subject: [PATCH 35/58] Add a couple of options for git-flow. --- plugins/git-flow/git-flow.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/git-flow/git-flow.plugin.zsh b/plugins/git-flow/git-flow.plugin.zsh index 270bcbe3..71b34388 100644 --- a/plugins/git-flow/git-flow.plugin.zsh +++ b/plugins/git-flow/git-flow.plugin.zsh @@ -110,6 +110,8 @@ __git-flow-release () -u'[Use the given GPG-key for the digital signature (implies -s)]'\ -m'[Use the given tag message]'\ -p'[Push to $ORIGIN after performing finish]'\ + -k'[Keep branch after performing finish]'\ + -n"[Don't tag this release]"\ ':version:__git_flow_version_list' ;; @@ -162,6 +164,8 @@ __git-flow-hotfix () -u'[Use the given GPG-key for the digital signature (implies -s)]'\ -m'[Use the given tag message]'\ -p'[Push to $ORIGIN after performing finish]'\ + -k'[Keep branch after performing finish]'\ + -n"[Don't tag this release]"\ ':hotfix:__git_flow_hotfix_list' ;; From 083cff4a577f8889db4ec201d2309b126a65e894 Mon Sep 17 00:00:00 2001 From: westonplatter Date: Fri, 8 Jun 2012 12:18:26 -0400 Subject: [PATCH 36/58] checking if airport allows git protocol --- README.textile | 1 + 1 file changed, 1 insertion(+) diff --git a/README.textile b/README.textile index bf677666..875d02f8 100644 --- a/README.textile +++ b/README.textile @@ -1,5 +1,6 @@ A handful of functions, auto-complete helpers, and stuff that makes you shout... + bq. "OH MY ZSHELL!" h2. Setup From 61ceec528533bdc2865cf3d04a9214dda6f0f173 Mon Sep 17 00:00:00 2001 From: Jaiden Mispy <^_^@mispy.me> Date: Sat, 9 Jun 2012 11:04:58 +1000 Subject: [PATCH 37/58] Plugin which loads Python virtualenvwrapper and activates virtualenvs on cd into git repos --- .../virtualenvwrapper.plugin.zsh | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh new file mode 100644 index 00000000..afdad1be --- /dev/null +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -0,0 +1,47 @@ +WRAPPER_FOUND=0 +for wrapsource in "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/virtualenvwrapper" ; do + if [[ -e $wrapsource ]] ; then + WRAPPER_FOUND=1 + source $wrapsource + + if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then + # Automatically activate Git projects' virtual environments based on the + # directory name of the project. Virtual environment name can be overridden + # by placing a .venv file in the project root with a virtualenv name in it + function workon_cwd { + # Check that this is a Git repo + GIT_DIR=`git rev-parse --git-dir 2> /dev/null` + if (( $? == 0 )); then + # Find the repo root and check for virtualenv name override + GIT_DIR=`readlink -f $GIT_DIR` + PROJECT_ROOT=`dirname "$GIT_DIR"` + ENV_NAME=`basename "$PROJECT_ROOT"` + if [[ -f "$PROJECT_ROOT/.venv" ]]; then + ENV_NAME=`cat "$PROJECT_ROOT/.venv"` + fi + # Activate the environment only if it is not already active + if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then + if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then + workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME" + fi + fi + elif [ $CD_VIRTUAL_ENV ]; then + # We've just left the repo, deactivate the environment + # Note: this only happens if the virtualenv was activated automatically + deactivate && unset CD_VIRTUAL_ENV + fi + } + + # New cd function that does the virtualenv magic + function cd { + builtin cd "$@" && workon_cwd + } + fi + + break + fi +done + +if [ $WRAPPER_FOUND -eq 0 ] ; then + print "zsh virtualenvwrapper plugin: Couldn't activate virtualenvwrapper. Please run \`pip install virtualenvwrapper\`." +fi From 1bb715965c1dde1ed6f4456b462ae59e1b3769da Mon Sep 17 00:00:00 2001 From: s3 Date: Tue, 12 Jun 2012 10:18:02 +0200 Subject: [PATCH 38/58] Change hardcoded ~/.oh-my-zsh to $ZSH. --- lib/completion.zsh | 2 +- plugins/dirpersist/dirpersist.plugin.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index b964595e..f31e101d 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -46,7 +46,7 @@ zstyle ':completion:*:hosts' hosts $hosts # Use caching so that commands like apt and dpkg complete are useable zstyle ':completion::complete:*' use-cache 1 -zstyle ':completion::complete:*' cache-path ~/.oh-my-zsh/cache/ +zstyle ':completion::complete:*' cache-path $ZSH/cache/ # Don't complete uninteresting users zstyle ':completion:*:*:*:users' ignored-patterns \ diff --git a/plugins/dirpersist/dirpersist.plugin.zsh b/plugins/dirpersist/dirpersist.plugin.zsh index 6a2b289a..0f6d9f43 100644 --- a/plugins/dirpersist/dirpersist.plugin.zsh +++ b/plugins/dirpersist/dirpersist.plugin.zsh @@ -12,7 +12,7 @@ dirpersistinstall () { if grep 'dirpersiststore' ~/.zlogout > /dev/null; then else if read -q \?"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "; then - echo "# Store dirs stack\n# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout + echo "# Store dirs stack\n# See $ZSH/plugins/dirspersist.plugin.zsh\ndirpersiststore" >> ~/.zlogout else echo "If you don't want this message to appear, remove dirspersist from \$plugins" fi From 37bce2b51a528c6be5dc4605c81aab70c949a3a3 Mon Sep 17 00:00:00 2001 From: thackoun Date: Tue, 12 Jun 2012 15:48:00 +0300 Subject: [PATCH 39/58] fix a very minor bug with colors of parenthesis in the terminalparty theme --- themes/terminalparty.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/terminalparty.zsh-theme b/themes/terminalparty.zsh-theme index 73653aca..216ce37e 100644 --- a/themes/terminalparty.zsh-theme +++ b/themes/terminalparty.zsh-theme @@ -2,7 +2,7 @@ PROMPT='%{$fg[green]%} %% ' # RPS1='%{$fg[blue]%}%~%{$reset_color%} ' RPS1='%{$fg[white]%}%2~$(git_prompt_info) %{$fg_bold[blue]%}%m%{$reset_color%}' -ZSH_THEME_GIT_PROMPT_PREFIX=" (%{$fg[yellow]%}" +ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}(" ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ⚡%{$fg[yellow]%}" From dee54a2477d2a5be5d6cced7497f539ecfc2e05f Mon Sep 17 00:00:00 2001 From: Kristi Date: Wed, 13 Jun 2012 12:57:15 -0700 Subject: [PATCH 40/58] Use grep to detect if untracked files exist instead of storing all the output of ls-files. --- themes/steeef.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme index a2583b02..f22ce271 100644 --- a/themes/steeef.zsh-theme +++ b/themes/steeef.zsh-theme @@ -81,7 +81,7 @@ add-zsh-hook chpwd steeef_chpwd function steeef_precmd { if [[ -n "$PR_GIT_UPDATE" ]] ; then # check for untracked files or updated submodules, since vcs_info doesn't - if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then + if git ls-files --other --exclude-standard 2> /dev/null | grep -q "."; then PR_GIT_UPDATE=1 FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})" else From 4199c1a6f77f1605157b1cfa6baa47c14c68a6c9 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Wed, 13 Jun 2012 13:14:23 -0700 Subject: [PATCH 41/58] Updating README to ask people to stop sending themes for now --- README.textile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index 875d02f8..a38e2d7c 100644 --- a/README.textile +++ b/README.textile @@ -69,9 +69,13 @@ h2. Help out! I'm far from being a zsh-expert and suspect there are many ways to improve. If you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests! -h3. Send us your theme! +h3. (Don't) Send us your theme! (for now) + +-I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory.- + +We have enough themes for the time being. Please fork the project and add on in there, you can let people know how to grab it from there. + -I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory. h2. Contributors From 4d6b532248fce0e71d762eb1ec3ef2ec8fcd5289 Mon Sep 17 00:00:00 2001 From: Kristi Date: Wed, 13 Jun 2012 13:14:31 -0700 Subject: [PATCH 42/58] add --directory flag --- themes/steeef.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme index f22ce271..312229e9 100644 --- a/themes/steeef.zsh-theme +++ b/themes/steeef.zsh-theme @@ -81,7 +81,7 @@ add-zsh-hook chpwd steeef_chpwd function steeef_precmd { if [[ -n "$PR_GIT_UPDATE" ]] ; then # check for untracked files or updated submodules, since vcs_info doesn't - if git ls-files --other --exclude-standard 2> /dev/null | grep -q "."; then + if git ls-files --other --exclude-standard --directory 2> /dev/null | grep -q "."; then PR_GIT_UPDATE=1 FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})" else From c65a53df811953b9f4117ff0b8014d869565bf9d Mon Sep 17 00:00:00 2001 From: Roey Darwish Dror Date: Fri, 15 Jun 2012 10:07:22 +0300 Subject: [PATCH 43/58] Fixed unmached " in yum plugin --- plugins/yum/yum.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/yum/yum.plugin.zsh b/plugins/yum/yum.plugin.zsh index c9966f1b..69abfc4c 100644 --- a/plugins/yum/yum.plugin.zsh +++ b/plugins/yum/yum.plugin.zsh @@ -5,7 +5,7 @@ alias yp="yum info" # show package info alias yl="yum list" # list packages alias ygl="yum grouplist" # list package groups alias yli="yum list installed" # print all installed packages -alias ymc="yum makecache # rebuilds the yum package list +alias ymc="yum makecache" # rebuilds the yum package list alias yu="sudo yum update" # upgrate packages alias yi="sudo yum install" # install package From 823cc9180c21c0520713b39fe3e3590645c76ad2 Mon Sep 17 00:00:00 2001 From: Thomas Dippel Date: Sat, 16 Jun 2012 12:41:44 +0200 Subject: [PATCH 44/58] Explicitly tell rbenv to use zsh According to @graywh's comment on: https://github.com/sstephenson/rbenv/issues/185 --- plugins/rbenv/rbenv.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index ae37404c..4c4647b3 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -4,7 +4,7 @@ for rbenvdir in "$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" ; do FOUND_RBENV=1 export RBENV_ROOT=$rbenvdir export PATH=${rbenvdir}/bin:$PATH - eval "$(rbenv init -)" + eval "$(rbenv init - zsh)" alias rubies="rbenv versions" alias gemsets="rbenv gemset list" From 82f785bc6751dc7c199b5d1ea068567120b92511 Mon Sep 17 00:00:00 2001 From: James Walker Date: Mon, 18 Jun 2012 10:41:19 -0400 Subject: [PATCH 45/58] remove readlink call and clean up --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index afdad1be..a93c8e86 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -10,11 +10,9 @@ for wrapsource in "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/ # by placing a .venv file in the project root with a virtualenv name in it function workon_cwd { # Check that this is a Git repo - GIT_DIR=`git rev-parse --git-dir 2> /dev/null` + PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null` if (( $? == 0 )); then - # Find the repo root and check for virtualenv name override - GIT_DIR=`readlink -f $GIT_DIR` - PROJECT_ROOT=`dirname "$GIT_DIR"` + # Check for virtualenv name override ENV_NAME=`basename "$PROJECT_ROOT"` if [[ -f "$PROJECT_ROOT/.venv" ]]; then ENV_NAME=`cat "$PROJECT_ROOT/.venv"` @@ -30,6 +28,7 @@ for wrapsource in "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/ # Note: this only happens if the virtualenv was activated automatically deactivate && unset CD_VIRTUAL_ENV fi + unset PROJECT_ROOT } # New cd function that does the virtualenv magic From e9a9deacb09196a48a39adc827d861e1896f4c59 Mon Sep 17 00:00:00 2001 From: Tima Maslyuchenko Date: Mon, 18 Jun 2012 20:15:57 +0300 Subject: [PATCH 46/58] rbenv plugin now uses 'brew --prefix rbenv' command to find rbenv folder --- plugins/rbenv/rbenv.plugin.zsh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index ae37404c..a0a64c7e 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -1,5 +1,18 @@ +function is_homebrew_installed() { + type brew &> /dev/null +} + +function is_rbenv_installed() { + brew --prefix rbenv &> /dev/null +} + FOUND_RBENV=0 -for rbenvdir in "$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" ; do +rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv") +if is_homebrew_installed && is_rbenv_installed ; then + rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}") +fi + +for rbenvdir in "${rbenvdirs[@]}" ; do if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then FOUND_RBENV=1 export RBENV_ROOT=$rbenvdir From 5931f64308cbf4b0a8ef740a6b4eda5834479bd7 Mon Sep 17 00:00:00 2001 From: Tima Maslyuchenko Date: Mon, 18 Jun 2012 21:29:24 +0300 Subject: [PATCH 47/58] sanitized code according to coding style --- plugins/rbenv/rbenv.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index a0a64c7e..a62dd560 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -1,14 +1,14 @@ -function is_homebrew_installed() { +_homebrew-installed() { type brew &> /dev/null } -function is_rbenv_installed() { +_rbenv-from-homebrew-installed() { brew --prefix rbenv &> /dev/null } FOUND_RBENV=0 rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv") -if is_homebrew_installed && is_rbenv_installed ; then +if _homebrew-installed && _rbenv-from-homebrew-installed ; then rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}") fi From b97cc939ec50cbd424beb4d9d5d61625b209ccac Mon Sep 17 00:00:00 2001 From: Andy Fleming Date: Wed, 20 Jun 2012 13:17:41 -0700 Subject: [PATCH 48/58] added first version of my theme af-magic --- themes/af-magic.zsh-theme | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 themes/af-magic.zsh-theme diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme new file mode 100644 index 00000000..241393f1 --- /dev/null +++ b/themes/af-magic.zsh-theme @@ -0,0 +1,39 @@ +# af-magic.zsh-theme +# +# Author: Andy Fleming +# URL: http://andyfleming.com/ +# +# Created on: June 19, 2012 +# Last modified on: June 20, 2012 + + + +if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + + +PROMPT='$FG[237]------------------------------------------------------------%{$reset_color%} +$FG[032]%~\ +$(git_prompt_info) \ +$FG[105]%(!.#.»)%{$reset_color%} ' +PROMPT2='%{$fg[red]%}\ %{$reset_color%}' +RPS1='${return_code}' + + + +eval my_gray='$FG[237]' +eval my_orange='$FG[214]' +RPROMPT='$my_gray%n@%m%{$reset_color%}%' + + +ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:" +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}" + + + +# LS colors, made with http://geoff.greer.fm/lscolors/ +#export LSCOLORS="exfxcxdxbxegedabagacad" +#export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:' + From 98d7a010994cd39758e4a1599cefe9e130a346db Mon Sep 17 00:00:00 2001 From: Andy Fleming Date: Wed, 20 Jun 2012 13:26:05 -0700 Subject: [PATCH 49/58] theme cleanup --- themes/af-magic.zsh-theme | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/themes/af-magic.zsh-theme b/themes/af-magic.zsh-theme index 241393f1..c1b00c62 100644 --- a/themes/af-magic.zsh-theme +++ b/themes/af-magic.zsh-theme @@ -2,6 +2,8 @@ # # Author: Andy Fleming # URL: http://andyfleming.com/ +# Repo: https://github.com/andyfleming/oh-my-zsh +# Direct Link: https://github.com/andyfleming/oh-my-zsh/blob/master/themes/af-magic.zsh-theme # # Created on: June 19, 2012 # Last modified on: June 20, 2012 @@ -11,7 +13,7 @@ if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" - +# primary prompt PROMPT='$FG[237]------------------------------------------------------------%{$reset_color%} $FG[032]%~\ $(git_prompt_info) \ @@ -20,20 +22,15 @@ PROMPT2='%{$fg[red]%}\ %{$reset_color%}' RPS1='${return_code}' - +# color vars eval my_gray='$FG[237]' eval my_orange='$FG[214]' + +# right prompt RPROMPT='$my_gray%n@%m%{$reset_color%}%' - +# git settings ZSH_THEME_GIT_PROMPT_PREFIX="$FG[075](branch:" ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_DIRTY="$my_orange*%{$reset_color%}" ZSH_THEME_GIT_PROMPT_SUFFIX="$FG[075])%{$reset_color%}" - - - -# LS colors, made with http://geoff.greer.fm/lscolors/ -#export LSCOLORS="exfxcxdxbxegedabagacad" -#export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:' - From 7e1da28d27f42e4d873cdfc28ef362d59d8c2b07 Mon Sep 17 00:00:00 2001 From: jugyo Date: Thu, 21 Jun 2012 07:41:50 +0900 Subject: [PATCH 50/58] correct the ruby version label for rbenv --- themes/nebirhos.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/nebirhos.zsh-theme b/themes/nebirhos.zsh-theme index c5864d9b..a5a226b6 100644 --- a/themes/nebirhos.zsh-theme +++ b/themes/nebirhos.zsh-theme @@ -6,7 +6,7 @@ if [ -e ~/.rvm/bin/rvm-prompt ]; then RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} " else if which rbenv &> /dev/null; then - RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%})%{$reset_color%} " + RUBY_PROMPT_="%{$fg_bold[blue]%}rbenv:(%{$fg[green]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%})%{$reset_color%} " fi fi From 3aa0cb74d0a19a8053889a976404a7915585466e Mon Sep 17 00:00:00 2001 From: Volker Pacher Date: Fri, 22 Jun 2012 18:27:21 +0100 Subject: [PATCH 51/58] added plugin for jruby --- plugins/jruby/jruby.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) create mode 100755 plugins/jruby/jruby.plugin.zsh diff --git a/plugins/jruby/jruby.plugin.zsh b/plugins/jruby/jruby.plugin.zsh new file mode 100755 index 00000000..58781fc7 --- /dev/null +++ b/plugins/jruby/jruby.plugin.zsh @@ -0,0 +1,3 @@ +# Aliases +alias jrspec='jruby --debug -S rspec --debug' +alias jprofile='jruby --profile.api -S rspec' From 5c37c85fb49a377b59115efc2aa132665982ac06 Mon Sep 17 00:00:00 2001 From: Volker Pacher Date: Fri, 22 Jun 2012 18:33:11 +0100 Subject: [PATCH 52/58] added jexec --- plugins/jruby/jruby.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/jruby/jruby.plugin.zsh b/plugins/jruby/jruby.plugin.zsh index 58781fc7..bb7975b1 100755 --- a/plugins/jruby/jruby.plugin.zsh +++ b/plugins/jruby/jruby.plugin.zsh @@ -1,3 +1,4 @@ # Aliases alias jrspec='jruby --debug -S rspec --debug' alias jprofile='jruby --profile.api -S rspec' +alias jexec='jruby -S' From a39c9ffe5b7236b6e4dc78efa80b478cc411af7f Mon Sep 17 00:00:00 2001 From: Renan Cakirerk Date: Sat, 23 Jun 2012 14:53:40 +0300 Subject: [PATCH 53/58] Fix finding git issue. http://stackoverflow.com/questions/592620/check-if-a-program-exists-from-a-bash-script --- tools/install.sh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 8ca427d2..b080be3a 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -5,13 +5,10 @@ then fi echo "\033[0;34mCloning Oh My Zsh...\033[0m" -which git > /dev/null -if [[ $? -eq 0 ]]; then - /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh -else +hash git >/dev/null && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh || { echo "git not installed" exit -fi +} echo "\033[0;34mLooking for an existing zsh config...\033[0m" if [ -f ~/.zshrc ] || [ -h ~/.zshrc ] From d15ec4bf248cf091fb31dd10da066c040abcd744 Mon Sep 17 00:00:00 2001 From: David Barragan Date: Mon, 25 Jun 2012 10:55:23 +0200 Subject: [PATCH 54/58] Added another path --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index a93c8e86..5d086040 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -1,5 +1,5 @@ WRAPPER_FOUND=0 -for wrapsource in "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/virtualenvwrapper" ; do +for wrapsource in "/usr/bin/virtualenvwrapper.sh" "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/virtualenvwrapper" ; do if [[ -e $wrapsource ]] ; then WRAPPER_FOUND=1 source $wrapsource From e2ddf1ef8c1147586a11c25007b201e9cbcfe278 Mon Sep 17 00:00:00 2001 From: Eustachy Kapusta Date: Sun, 1 Jul 2012 19:57:32 +0200 Subject: [PATCH 55/58] Remove bogus "-" from nomz="ps -aux" alias. Info from http://procps.sourceforge.net/faq.html . --- plugins/lol/lol.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/lol/lol.plugin.zsh b/plugins/lol/lol.plugin.zsh index e455527e..697f98d6 100644 --- a/plugins/lol/lol.plugin.zsh +++ b/plugins/lol/lol.plugin.zsh @@ -29,7 +29,7 @@ alias iminurbase='finger' alias btw='nice' alias obtw='nohup' -alias nomz='ps -aux' +alias nomz='ps aux' alias nomnom='killall' alias byes='exit' From e3ff4b58c6b0012c616ea7a1dc44cde7a2ecfb57 Mon Sep 17 00:00:00 2001 From: lukas Date: Tue, 3 Jul 2012 09:59:42 +0200 Subject: [PATCH 56/58] provide plugin for rbfu the ruby version switcher Evaluates $(rbfu --init --auto) if rbfu is installed on the system, also has a custom rbfu-rubies method which lists the installed rubies which are available to rbfu. For compatibility with themes, also creates the rvm_prompt_info function, so existing themes should work out of the box. --- plugins/rbfu/rbfu.plugin.zsh | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 plugins/rbfu/rbfu.plugin.zsh diff --git a/plugins/rbfu/rbfu.plugin.zsh b/plugins/rbfu/rbfu.plugin.zsh new file mode 100644 index 00000000..00848520 --- /dev/null +++ b/plugins/rbfu/rbfu.plugin.zsh @@ -0,0 +1,42 @@ +# Enables rbfu with --auto option, if available. +# +# Also provides a command to list all installed/available +# rubies. To ensure compatibility with themes, creates the +# rvm_prompt_info function to return the $RBFU_RUBY_VERSION +# version. + +command -v rbfu &>/dev/null + +if [[ $? -eq 0 ]]; then + eval "$(rbfu --init --auto)" + + # Internal: Print ruby version details, if it's currently + # active etc. + function _rbfu_rubies_print() { + local rb rb_out + rb=$(basename $1) + rb_out="$rb" + [[ -h $1 ]] && rb_out="$rb_out${fg[green]}@${reset_color}" + [[ "x$rb" == "x$2" ]] && rb_out="${fg[red]}$rb_out ${fg[red]}*${reset_color}" + echo $rb_out + } + + # Public: Provide a list with all available rubies, this basically depends + # on `ls -1` and .rfbu/rubies. Highlights the currently active ruby version + # and aliases. + function rbfu-rubies() { + local rbfu_dir active_rb + rbfu_dir=$RBFU_RUBIES + active_rb=$RBFU_RUBY_VERSION + [[ -z "$rbfu_dir" ]] && rbfu_dir="${HOME}/.rbfu/rubies" + [[ -z "$active_rb" ]] && active_rb="system" + _rbfu_rubies_print "${rbfu_dir}/system" $active_rb + for rb in $(ls -1 $rbfu_dir); do + _rbfu_rubies_print "${rbfu_dir}/${rb}" $active_rb + done + } + + # Public: Create rvm_prompt_info command for themes compatibility, unless + # it has already been defined. + [ ! -x rvm_prompt_info ] && function rvm_prompt_info() { echo "${RBFU_RUBY_VERSION:=system}" } +fi From 92b6cae02638f644e6359e3f553805e2c3eba957 Mon Sep 17 00:00:00 2001 From: Josh Vermaire Date: Sun, 8 Jul 2012 23:34:27 -0700 Subject: [PATCH 57/58] escape whitespace --- plugins/sublime/sublime.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 0035b1b2..781c8f83 100755 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -4,6 +4,6 @@ if [[ $('uname') == 'Linux' ]]; then alias st='/usr/bin/sublime_text&' elif [[ $('uname') == 'Darwin' ]]; then - alias st='open -a /Applications/Sublime Text 2.app' + alias st='open -a /Applications/Sublime\ Text\ 2.app' fi alias stt='st .' From a15bcd6461b5b8237844c4e2968df0518dab5e9a Mon Sep 17 00:00:00 2001 From: Josh Vermaire Date: Mon, 9 Jul 2012 00:11:07 -0700 Subject: [PATCH 58/58] utilize sublime's embedded command line binary --- plugins/sublime/sublime.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 781c8f83..91b0279c 100755 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -4,6 +4,6 @@ if [[ $('uname') == 'Linux' ]]; then alias st='/usr/bin/sublime_text&' elif [[ $('uname') == 'Darwin' ]]; then - alias st='open -a /Applications/Sublime\ Text\ 2.app' + alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl' fi alias stt='st .'