From 60c3fa937120f38b1215a57889c8207989c9a7f1 Mon Sep 17 00:00:00 2001 From: dir01 Date: Thu, 22 Mar 2012 04:34:19 +0700 Subject: [PATCH 01/10] 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 3ea34d718..8be3cd863 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 5eb466a7886e1220584322a10964343a101ed1dc Mon Sep 17 00:00:00 2001 From: Dylan Hudson Date: Thu, 19 Apr 2012 00:14:55 -0700 Subject: [PATCH 02/10] 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 000000000..e0f6e052c --- /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 03/10] 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 e0f6e052c..c42c68df1 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 04/10] 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 e2cf96ca3..4d5bfb8dd 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 05/10] 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 732a403b7..e360344b0 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 06/10] 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 e360344b0..c2b6049cb 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 8de877d63222ed4effad7d52d68fccca2c01b6dd Mon Sep 17 00:00:00 2001 From: Amar Raja Date: Tue, 29 May 2012 10:20:49 +0200 Subject: [PATCH 07/10] 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 e1f571237..2b80b76e6 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 08/10] 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 16a5d54ca..5b6e5cfd4 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 09/10] 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 5b6e5cfd4..39d3ef36a 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 10/10] 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 524aa509d..bbd705a1e 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