From a7c88c988a4be02b8883c06e57c6eb290c8fcb21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A4ntz=20Miccoli?= Date: Sun, 15 Sep 2013 23:16:11 +0200 Subject: [PATCH 01/32] Removed comments and other elements that might appear in the phing -l output. The current version doesn't work at all on my environment (OSX 10.7) --- plugins/phing/phing.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh index 795f1db85..9af03af24 100644 --- a/plugins/phing/phing.plugin.zsh +++ b/plugins/phing/phing.plugin.zsh @@ -7,7 +7,7 @@ _phing_does_target_list_need_generating () { _phing () { if [ -f build.xml ]; then if _phing_does_target_list_need_generating; then - phing -l |grep -v ":$" |grep -v "^-*$" > .phing_targets + phing -l|grep -v "\[property\]"|grep -v "Buildfile"|sed 1d|grep -v ":$" |grep -v "^\-*$"|awk '{print $1}' > .phing_targets fi compadd `cat .phing_targets` fi From 9c11202fde61bf3db6755f4083c320d710fe3bd5 Mon Sep 17 00:00:00 2001 From: frantzmiccoli Date: Fri, 13 Jun 2014 20:28:37 +0200 Subject: [PATCH 02/32] fix `-nt` usage --- plugins/phing/phing.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh index 9af03af24..1f022047c 100644 --- a/plugins/phing/phing.plugin.zsh +++ b/plugins/phing/phing.plugin.zsh @@ -1,6 +1,6 @@ _phing_does_target_list_need_generating () { [ ! -f .phing_targets ] && return 0; - [ .phing_targets -nt build.xml ] && return 0; + [ build.xml -nt .phing_targets ] && return 0; return 1; } From eb0549750fccde126584d6be59df8d2d62882750 Mon Sep 17 00:00:00 2001 From: Peter Butkovic Date: Tue, 16 Sep 2014 10:35:43 +0200 Subject: [PATCH 03/32] additional tmux aliases --- plugins/tmux/tmux.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 626c41f3d..bc32c8907 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -5,6 +5,8 @@ alias ta='tmux attach -t' alias ts='tmux new-session -s' alias tl='tmux list-sessions' +alias tksv='tmux kill-server' +alias tkss='tmux kill-session -t' # Only run if tmux is actually installed if which tmux &> /dev/null From 8bd8597e12d25ada4a288bffef946ac62b9f9de4 Mon Sep 17 00:00:00 2001 From: Ian Lancaster Date: Sat, 8 Nov 2014 04:58:52 -0500 Subject: [PATCH 04/32] Remove deprecated brew commands, update core commands `brew services` and `brew server` were moved to homebrew-boneyard. --- plugins/brew/_brew | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/plugins/brew/_brew b/plugins/brew/_brew index 40442a1d3..d11aa245d 100644 --- a/plugins/brew/_brew +++ b/plugins/brew/_brew @@ -19,21 +19,18 @@ _brew_outdated_formulae() { outdated_formulae=(`brew outdated`) } -_brew_running_services() { - running_services=(`brew services list | awk '{print $1}'`) -} - local -a _1st_arguments _1st_arguments=( 'audit:check formulae for Homebrew coding style' - 'bundle:look for a Brewfile and run each line as a brew command' 'cat:display formula file for a formula' 'cleanup:uninstall unused and old versions of packages' 'commands:show a list of commands' 'create:create a new formula' - 'deps:list dependencies and dependants of a formula' + 'deps:list dependencies of a formula' 'doctor:audits your installation for common issues' 'edit:edit a formula' + 'fetch:download formula resources to the cache' + 'gist-logs:generate a gist of the full build logs' 'home:visit the homepage of a formula or the brew project' 'info:information about a formula' 'install:install a formula' @@ -44,32 +41,24 @@ _1st_arguments=( 'missing:check all installed formuale for missing dependencies.' 'outdated:list formulae for which a newer version is available' 'pin:pin specified formulae' + 'postinstall:perform post_install for a given formula' 'prune:remove dead links' 'remove:remove a formula' 'search:search for a formula (/regex/ or string)' - 'server:start a local web app that lets you browse formulae (requires Sinatra)' - 'services:small wrapper around `launchctl` for supported formulae' + 'switch:switch linkage between installed versions of a formula' 'tap:tap a new formula repository from GitHub, or list existing taps' + 'test-bot:test a formula and build a bottle' 'uninstall:uninstall a formula' 'unlink:unlink a formula' 'unpin:unpin specified formulae' 'untap:remove a tapped repository' - 'update:freshen up links' + 'update:pull latest repository' 'upgrade:upgrade outdated formulae' 'uses:show formulae which depend on a formula' ) -local -a _service_arguments -_service_arguments=( - 'cleanup:get rid of stale services and unused plists' - 'list:list all services managed by `brew services`' - 'restart:gracefully restart selected service' - 'start:start selected service' - 'stop:stop selected service' -) - local expl -local -a formulae installed_formulae installed_taps outdated_formulae running_services +local -a formulae installed_formulae installed_taps outdated_formulae _arguments \ '(-v)-v[verbose]' \ @@ -80,6 +69,7 @@ _arguments \ '(--version)--version[version information]' \ '(--prefix)--prefix[where brew lives on this system]' \ '(--cache)--cache[brew cache]' \ + '(--force)--force[brew force]' \ '*:: :->subcmds' && return 0 if (( CURRENT == 1 )); then @@ -109,16 +99,6 @@ case "$words[1]" in _arguments \ '(--macports)--macports[search the macports repository]' \ '(--fink)--fink[search the fink repository]' ;; - services) - if [[ -n "$words[2]" ]]; then - case "$words[2]" in - restart|start|stop) - _brew_running_services - _wanted running_services expl 'running services' compadd -a running_services ;; - esac - else - _describe -t commands "brew services subcommand" _service_arguments - fi ;; untap) _brew_installed_taps _wanted installed_taps expl 'installed taps' compadd -a installed_taps ;; From 00ec11d3c0a2b2b7413ad84940ddec299aafbb04 Mon Sep 17 00:00:00 2001 From: DanielFGray Date: Sun, 16 Nov 2014 02:47:35 -0600 Subject: [PATCH 05/32] ignore any grep aliases that might be defined --- lib/git.zsh | 2 +- plugins/mercurial/mercurial.plugin.zsh | 2 +- plugins/svn-fast-info/svn-fast-info.plugin.zsh | 12 ++++++------ plugins/svn/svn.plugin.zsh | 4 ++-- themes/agnoster.zsh-theme | 4 ++-- themes/bureau.zsh-theme | 2 +- themes/mortalscumbag.zsh-theme | 6 +++--- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index aba095422..913a642b3 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -78,7 +78,7 @@ function git_prompt_long_sha() { git_prompt_status() { INDEX=$(command git status --porcelain -b 2> /dev/null) STATUS="" - if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then + if $(echo "$INDEX" | command grep -E '^\?\? ' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS" fi if $(echo "$INDEX" | grep '^A ' &> /dev/null); then diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index ff95d5e40..ed4d23713 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -42,7 +42,7 @@ $ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_HG_PROMPT_SU function hg_dirty_choose { if [ $(in_hg) ]; then - hg status 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]' + hg status 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]' if [ $pipestatus[-1] -eq 0 ]; then # Grep exits with 0 when "One or more lines were selected", return "dirty". echo $1 diff --git a/plugins/svn-fast-info/svn-fast-info.plugin.zsh b/plugins/svn-fast-info/svn-fast-info.plugin.zsh index ea19bcea0..9ea7f641d 100644 --- a/plugins/svn-fast-info/svn-fast-info.plugin.zsh +++ b/plugins/svn-fast-info/svn-fast-info.plugin.zsh @@ -63,11 +63,11 @@ function svn_current_revision() { function svn_status_info() { local svn_status_string="$ZSH_THEME_SVN_PROMPT_CLEAN" local svn_status="$(svn status 2> /dev/null)"; - if grep -E '^\s*A' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_ADDITIONS:-+}"; fi - if grep -E '^\s*D' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DELETIONS:-✖}"; fi - if grep -E '^\s*M' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_MODIFICATIONS:-✎}"; fi - if grep -E '^\s*[R~]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_REPLACEMENTS:-∿}"; fi - if grep -E '^\s*\?' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_UNTRACKED:-?}"; fi - if grep -E '^\s*[CI!L]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DIRTY:-'!'}"; fi + if command grep -E '^\s*A' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_ADDITIONS:-+}"; fi + if command grep -E '^\s*D' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DELETIONS:-✖}"; fi + if command grep -E '^\s*M' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_MODIFICATIONS:-✎}"; fi + if command grep -E '^\s*[R~]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_REPLACEMENTS:-∿}"; fi + if command grep -E '^\s*\?' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_UNTRACKED:-?}"; fi + if command grep -E '^\s*[CI!L]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DIRTY:-'!'}"; fi echo $svn_status_string } diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh index ba281d790..9f7a4c6eb 100644 --- a/plugins/svn/svn.plugin.zsh +++ b/plugins/svn/svn.plugin.zsh @@ -61,7 +61,7 @@ function svn_get_rev_nr() { function svn_dirty_choose() { if in_svn; then root=`svn info 2> /dev/null | sed -n 's/^Working Copy Root Path: //p'` - if $(svn status $root 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'); then + if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then # Grep exits with 0 when "One or more lines were selected", return "dirty". echo $1 else @@ -78,7 +78,7 @@ function svn_dirty() { function svn_dirty_choose_pwd () { if in_svn; then root=$PWD - if $(svn status $root 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'); then + if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then # Grep exits with 0 when "One or more lines were selected", return "dirty". echo $1 else diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 7a62bd860..8c7be6e01 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -123,10 +123,10 @@ prompt_hg() { st="" rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g') branch=$(hg id -b 2>/dev/null) - if `hg st | grep -Eq "^\?"`; then + if `hg st | grep -q "^\?"`; then prompt_segment red black st='±' - elif `hg st | grep -Eq "^(M|A)"`; then + elif `hg st | grep -q "^(M|A)"`; then prompt_segment yellow black st='±' else diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme index 443d1d5ee..148abec10 100644 --- a/themes/bureau.zsh-theme +++ b/themes/bureau.zsh-theme @@ -31,7 +31,7 @@ bureau_git_status () { if $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED" fi - if $(echo "$_INDEX" | grep -E '^\?\? ' &> /dev/null); then + if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED" fi if $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme index 5dbf2e4f6..ccce4197a 100644 --- a/themes/mortalscumbag.zsh-theme +++ b/themes/mortalscumbag.zsh-theme @@ -10,12 +10,12 @@ function my_git_prompt() { fi # is anything staged? - if $(echo "$INDEX" | grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then + if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED" fi # is anything unstaged? - if $(echo "$INDEX" | grep -E -e '^[ MARC][MD] ' &> /dev/null); then + if $(echo "$INDEX" | command grep -E -e '^[ MARC][MD] ' &> /dev/null); then STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED" fi @@ -25,7 +25,7 @@ function my_git_prompt() { fi # is anything unmerged? - if $(echo "$INDEX" | grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then + if $(echo "$INDEX" | command grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED" fi From 1dfadc734cb10c5512be4ec1dbe329a3e362ab20 Mon Sep 17 00:00:00 2001 From: Eric Ripa Date: Mon, 24 Nov 2014 09:54:50 +0100 Subject: [PATCH 06/32] Fix chruby plugin to not complain if chruby is *not* installed --- plugins/chruby/chruby.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh index 2a2c80cf6..b461b0c9b 100644 --- a/plugins/chruby/chruby.plugin.zsh +++ b/plugins/chruby/chruby.plugin.zsh @@ -24,7 +24,7 @@ _homebrew-installed() { } _chruby-from-homebrew-installed() { - brew --prefix chruby &> /dev/null + [ -r $(brew --prefix chruby)] &> /dev/null } _ruby-build_installed() { @@ -45,11 +45,11 @@ _source_from_omz_settings() { zstyle -s :omz:plugins:chruby path _chruby_path zstyle -s :omz:plugins:chruby auto _chruby_auto - if _chruby_path && [[ -r _chruby_path ]]; then + if ${_chruby_path} && [[ -r ${_chruby_path} ]]; then source ${_chruby_path} fi - if _chruby_auto && [[ -r _chruby_auto ]]; then + if ${_chruby_auto} && [[ -r ${_chruby_auto} ]]; then source ${_chruby_auto} fi } From 4b05e548d0b56238521b07dac1969e8cd2dcf608 Mon Sep 17 00:00:00 2001 From: benjaoming Date: Fri, 22 Nov 2013 11:48:13 +0100 Subject: [PATCH 07/32] Throw an error message when $WORKON_HOME is not set Took me a while to figure this one out, and I have a default installation of virtualenvwrapper -- this is a soft fix, just put an error message. But perhaps the fix should be to use the default value `~/.virtualenvs`. --- .../virtualenvwrapper.plugin.zsh | 100 ++++++++++-------- 1 file changed, 53 insertions(+), 47 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index f58bda1ad..52e02d3e0 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -1,57 +1,63 @@ virtualenvwrapper='virtualenvwrapper.sh' if (( $+commands[$virtualenvwrapper] )); then + source ${${virtualenvwrapper}:c} - if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then - # Automatically activate Git projects's 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 { - if [ ! $WORKON_CWD ]; then - WORKON_CWD=1 - # Check if this is a Git repo - PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null` - if (( $? != 0 )); then - PROJECT_ROOT="." - fi - # Check for virtualenv name override - if [[ -f "$PROJECT_ROOT/.venv" ]]; then - ENV_NAME=`cat "$PROJECT_ROOT/.venv"` - elif [[ -f "$PROJECT_ROOT/.venv/bin/activate" ]];then - ENV_NAME="$PROJECT_ROOT/.venv" - elif [[ "$PROJECT_ROOT" != "." ]]; then - ENV_NAME=`basename "$PROJECT_ROOT"` - else - ENV_NAME="" - fi - if [[ "$ENV_NAME" != "" ]]; then - # 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" - elif [[ -e "$ENV_NAME/bin/activate" ]]; then - source $ENV_NAME/bin/activate && 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 - unset PROJECT_ROOT - unset WORKON_CWD - fi - } + if [[ "$WORKON_HOME" == "" ]]; then + echo "\$WORKON_HOME is not defined so ZSH plugin virtualenvwrapper will not work" + else - # Append workon_cwd to the chpwd_functions array, so it will be called on cd - # http://zsh.sourceforge.net/Doc/Release/Functions.html - # TODO: replace with 'add-zsh-hook chpwd workon_cwd' when oh-my-zsh min version is raised above 4.3.4 - if (( ${+chpwd_functions} )); then - if (( $chpwd_functions[(I)workon_cwd] == 0 )); then - set -A chpwd_functions $chpwd_functions workon_cwd + if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then + # Automatically activate Git projects's 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 { + if [ ! $WORKON_CWD ]; then + WORKON_CWD=1 + # Check if this is a Git repo + PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null` + if (( $? != 0 )); then + PROJECT_ROOT="." + fi + # Check for virtualenv name override + if [[ -f "$PROJECT_ROOT/.venv" ]]; then + ENV_NAME=`cat "$PROJECT_ROOT/.venv"` + elif [[ -f "$PROJECT_ROOT/.venv/bin/activate" ]];then + ENV_NAME="$PROJECT_ROOT/.venv" + elif [[ "$PROJECT_ROOT" != "." ]]; then + ENV_NAME=`basename "$PROJECT_ROOT"` + else + ENV_NAME="" + fi + if [[ "$ENV_NAME" != "" ]]; then + # 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" + elif [[ -e "$ENV_NAME/bin/activate" ]]; then + source $ENV_NAME/bin/activate && 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 + unset PROJECT_ROOT + unset WORKON_CWD fi - else + } + + # Append workon_cwd to the chpwd_functions array, so it will be called on cd + # http://zsh.sourceforge.net/Doc/Release/Functions.html + # TODO: replace with 'add-zsh-hook chpwd workon_cwd' when oh-my-zsh min version is raised above 4.3.4 + if (( ${+chpwd_functions} )); then + if (( $chpwd_functions[(I)workon_cwd] == 0 )); then + set -A chpwd_functions $chpwd_functions workon_cwd + fi + else set -A chpwd_functions workon_cwd + fi fi fi else From 1ebc98b9ede5ad5084b3e504e4fc8c01cb93be71 Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sun, 30 Nov 2014 17:37:47 -0800 Subject: [PATCH 08/32] Don't clobber HISTSIZE or SAVEHIST if they're already set --- lib/history.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/history.zsh b/lib/history.zsh index 1d83e56e3..12dbcf4ee 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -1,9 +1,13 @@ ## Command history configuration -if [ -z $HISTFILE ]; then +if [ -z "$HISTFILE" ]; then HISTFILE=$HOME/.zsh_history fi -HISTSIZE=10000 -SAVEHIST=10000 +if [ -z "$HISTSIZE" ]; then + HISTSIZE=10000 +fi +if [ -z "$SAVEHIST" ]; then + SAVEHIST=10000 +fi setopt extended_history setopt hist_expire_dups_first From 5bf715787a4483cafd70461417cb9a1bf8d1509f Mon Sep 17 00:00:00 2001 From: Joe Block Date: Sun, 30 Nov 2014 17:39:21 -0800 Subject: [PATCH 09/32] Existing code indents with spaces, not tabs, conform. --- lib/history.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/history.zsh b/lib/history.zsh index 12dbcf4ee..179c22848 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -3,10 +3,10 @@ if [ -z "$HISTFILE" ]; then HISTFILE=$HOME/.zsh_history fi if [ -z "$HISTSIZE" ]; then - HISTSIZE=10000 + HISTSIZE=10000 fi if [ -z "$SAVEHIST" ]; then - SAVEHIST=10000 + SAVEHIST=10000 fi setopt extended_history From 575bb91b5f2e1220e566385e2982ca4f72521819 Mon Sep 17 00:00:00 2001 From: Emil Marashliev Date: Mon, 1 Dec 2014 13:34:18 +0200 Subject: [PATCH 10/32] Added Xcode alias for deleting Derived Data. --- plugins/xcode/xcode.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index b7b75cf93..1d1205b80 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -16,6 +16,7 @@ function xcsel { alias xcb='xcodebuild' alias xcp='xcode-select --print-path' +alias xcdd='rm -rf ~/Library/Developer/Xcode/DerivedData/*' if [[ -d $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app ]]; then alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app' From 011f25d492ab23b0f1dd50ea0f406892810e781e Mon Sep 17 00:00:00 2001 From: Ion Marusic Date: Tue, 2 Dec 2014 20:10:47 +0200 Subject: [PATCH 11/32] Fixed command autocomplete for Symfony 2.6.x --- plugins/symfony2/symfony2.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 8df22e9ad..7a19cbdd3 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -5,7 +5,7 @@ _symfony_console () { } _symfony2_get_command_list () { - `_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' + `_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ ?[a-z]+/ { print $1 }' } _symfony2 () { @@ -23,4 +23,4 @@ alias sfcl='sf cache:clear' alias sfcw='sf cache:warmup' alias sfroute='sf router:debug' alias sfcontainer='sf container:debug' -alias sfgb='sf generate:bundle' \ No newline at end of file +alias sfgb='sf generate:bundle' From a19d1d1f05281fc286991ff85010d6d431ae1d58 Mon Sep 17 00:00:00 2001 From: ZHANG Biao Date: Thu, 4 Dec 2014 11:38:37 +0800 Subject: [PATCH 12/32] autojump installed from github has mv the autojump.zsh to $HOME/.autojump/share/autojump/autojump.zsh --- plugins/autojump/autojump.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh index 652d22696..4cf036401 100644 --- a/plugins/autojump/autojump.plugin.zsh +++ b/plugins/autojump/autojump.plugin.zsh @@ -1,6 +1,8 @@ if [ $commands[autojump] ]; then # check if autojump is installed if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation . $HOME/.autojump/etc/profile.d/autojump.zsh + elif [ -f $HOME/.autojump/share/autojump/autojump.zsh ]; then # another manual user-local installation + . $HOME/.autojump/share/autojump/autojump.zsh elif [ -f $HOME/.nix-profile/etc/profile.d/autojump.zsh ]; then # nix installation . $HOME/.nix-profile/etc/profile.d/autojump.zsh elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package From 9bab8ccb89466be8bc8c579264f51b194aa89612 Mon Sep 17 00:00:00 2001 From: Anatoly Bubenkov Date: Wed, 10 Dec 2014 13:40:34 +0100 Subject: [PATCH 13/32] add current bookmark to rkj-repos theme --- themes/rkj-repos.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index 6289427c2..eed084f15 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -4,7 +4,7 @@ function hg_prompt_info { hg prompt --angle-brackets "\ -%{$reset_color%}>\ +%{$reset_color%}><:%{$fg[magenta]%}%{$reset_color%}>\ %{$reset_color%}>\ %{$fg[red]%}%{$reset_color%}< patches: >" 2>/dev/null From 9677cfb34e896a59896c4cc747108ca8e3d20e86 Mon Sep 17 00:00:00 2001 From: Rotem Yaari Date: Thu, 11 Dec 2014 23:41:47 +0200 Subject: [PATCH 14/32] Fix dircycle plugin dircycle right did not behave as expected and was fixed --- plugins/dircycle/dircycle.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh index 46a0ab268..c6b6ba785 100644 --- a/plugins/dircycle/dircycle.plugin.zsh +++ b/plugins/dircycle/dircycle.plugin.zsh @@ -5,6 +5,6 @@ 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 }" +eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q +0'; zle accept-line }" zle -N insert-cycledright bindkey "\e[1;6C" insert-cycledright From 1d2c1e8ab80922fb673a08440a8e2b33b9231de1 Mon Sep 17 00:00:00 2001 From: "Pete \"Peteches\" McCabe" Date: Fri, 12 Dec 2014 17:37:35 +0000 Subject: [PATCH 15/32] Fixed output issues webith websearch plugin. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - if user has rm set as an alias to 'rm -i' user is prompted to whether to remove the nohup.out file. $ ddg fools nohup: ignoring input and appending output to ‘nohup.out’ rm: remove regular empty file ‘nohup.out’? - if output redirected to a file nohup will not create nohup.out and rm is unecessary. --- plugins/web-search/web-search.plugin.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 371e3a303..28559deb9 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -37,8 +37,7 @@ function web_search() { done url="${url%?}" # remove the last '+' - nohup $open_cmd "$url" - rm nohup.out + nohup $open_cmd "$url" >/dev/null 2&>1 } From 43a2e24c25531c27e502313d23c44bd5d7e0c405 Mon Sep 17 00:00:00 2001 From: Ryan Robeson Date: Fri, 12 Dec 2014 15:56:59 -0500 Subject: [PATCH 16/32] Add itunes shuffle command to OSX plugin. Added shuffle functionality to the itunes command in the OSX plugin. iTunes 12 doesn't support setting the "shuffle" property on the playlist from what I've read, so this simulates the user interacting with the iTunes interface. The toggle option "clicks" the shuffle button in the Now Playing area. This has the effect of toggling the shuffle setting on whatever is currently playing. The on and off options use the Shuffle menu bar items. Usage: itunes shuffle [on|off|toggle] --- plugins/osx/osx.plugin.zsh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 2eea0d8ef..d366f1fc8 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -177,12 +177,43 @@ function itunes() { vol) opt="set sound volume to $1" #$1 Due to the shift ;; + shuf|shuff|shuffle) + # The shuffle property of current playlist can't be changed in iTunes 12, + # so this workaround uses AppleScript to simulate user input instead. + # Defaults to toggling when no options are given. + # The toggle option depends on the shuffle button being visible in the Now playing area. + # On and off use the menu bar items. + local state=$1 + + if [[ -n "$state" && ! "$state" =~ "^(on|off|toggle)$" ]] + then + print "Usage: itunes shuffle [on|off|toggle]. Invalid option." + return 1 + fi + + case "$state" in + on|off) + # Inspired by: http://stackoverflow.com/a/14675583 + osascript 1>/dev/null 2>&1 <<-EOF + tell application "System Events" to perform action "AXPress" of (menu item "${state}" of menu "Shuffle" of menu item "Shuffle" of menu "Controls" of menu bar item "Controls" of menu bar 1 of application process "iTunes" ) +EOF + return 0 + ;; + toggle|*) + osascript 1>/dev/null 2>&1 <<-EOF + tell application "System Events" to perform action "AXPress" of (button 2 of process "iTunes"'s window "iTunes"'s scroll area 1) +EOF + return 0 + ;; + esac + ;; ""|-h|--help) echo "Usage: itunes