diff options
Diffstat (limited to 'plugins')
38 files changed, 316 insertions, 37 deletions
diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh index 0aa14959d..50a694764 100644 --- a/plugins/autojump/autojump.plugin.zsh +++ b/plugins/autojump/autojump.plugin.zsh @@ -1,5 +1,7 @@ if [ $commands[autojump] ]; then # check if autojump is installed - if [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package + if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation + . $HOME/.autojump/etc/profile.d/autojump.zsh + elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package . /usr/share/autojump/autojump.zsh elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation . /etc/profile.d/autojump.zsh @@ -7,8 +9,6 @@ if [ $commands[autojump] ]; then # check if autojump is installed . /etc/profile.d/autojump.sh elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation . /usr/local/share/autojump/autojump.zsh - elif [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation - . $HOME/.autojump/etc/profile.d/autojump.zsh elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports . /opt/local/etc/profile.d/autojump.zsh elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew diff --git a/plugins/bower/_bower b/plugins/bower/_bower index ae0ca4a4e..ae0ca4a4e 100755..100644 --- a/plugins/bower/_bower +++ b/plugins/bower/_bower diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index c2e95884e..f9497aefb 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1 +1,2 @@ alias brews='brew list -1' +alias bubu="brew update && brew upgrade" diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 3338d78be..20931dcef 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -3,10 +3,11 @@ alias bl="bundle list" alias bp="bundle package" alias bo="bundle open" alias bu="bundle update" +alias bi="bundle_install" # The following is based on https://github.com/gma/bundler-exec -bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor taps thin thor unicorn unicorn_rails) +bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork spring strainer tailor taps thin thor unicorn unicorn_rails) # Remove $UNBUNDLED_COMMANDS from the bundled_commands list for cmd in $UNBUNDLED_COMMANDS; do @@ -15,7 +16,7 @@ done ## Functions -bi() { +bundle_install() { if _bundler-installed && _within-bundled-project; then local bundler_version=`bundle version | cut -d' ' -f3` if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then @@ -39,8 +40,8 @@ _bundler-installed() { } _within-bundled-project() { - local check_dir=$PWD - while [ $check_dir != "/" ]; do + local check_dir="$PWD" + while [ "$check_dir" != "/" ]; do [ -f "$check_dir/Gemfile" ] && return check_dir="$(dirname $check_dir)" done diff --git a/plugins/colemak/colemak.plugin.zsh b/plugins/colemak/colemak.plugin.zsh index 34d42c280..cb7cc5068 100644 --- a/plugins/colemak/colemak.plugin.zsh +++ b/plugins/colemak/colemak.plugin.zsh @@ -19,4 +19,4 @@ bindkey -a 'N' vi-join bindkey -a 'j' vi-forward-word-end bindkey -a 'J' vi-forward-blank-word-end -lesskey $ZSH_CUSTOM/plugins/colemak/colemak-less +lesskey $ZSH/plugins/colemak/colemak-less diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index 0696607d9..11b58e69d 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -1,4 +1,4 @@ -# Plugin for highligthing file content +# Plugin for highlighting file content # Plugin highlights file content based on the filename extension. # If no highlighting method supported for given extension then it tries # guess it by looking for file content. @@ -6,9 +6,9 @@ alias colorize='colorize_via_pygmentize' colorize_via_pygmentize() { - if [ ! -x $(which pygmentize) ]; then - echo package \'pygmentize\' is not installed! - exit -1 + if [ ! -x "$(which pygmentize)" ]; then + echo "package \'pygmentize\' is not installed!" + return -1 fi if [ $# -eq 0 ]; then @@ -25,4 +25,4 @@ colorize_via_pygmentize() { pygmentize -g "$FNAME" fi done -}
\ No newline at end of file +} diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index b19650fee..228a39da0 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -3,7 +3,6 @@ # # ls, the common ones I use a lot shortened for rapid fire usage -alias ls='ls --color' #I like color alias l='ls -lFh' #size,show type,human readable alias la='ls -lAFh' #long list,show almost all,show type,human readable alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable @@ -39,7 +38,7 @@ alias -g NE="2> /dev/null" alias -g NUL="> /dev/null 2>&1" alias -g P="2>&1| pygmentize -l pytb" -alias dud='du --max-depth=1 -h' +alias dud='du -d 1 -h' alias duf='du -sh *' alias fd='find . -type d -name' alias ff='find . -type f -name' diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 9975aaca4..86f2ca4df 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -46,3 +46,6 @@ alias cdu='composer dump-autoload' # install composer in the current directory alias cget='curl -s https://getcomposer.org/installer | php' + +# Add Composer's global binaries to PATH +export PATH=$PATH:~/.composer/vendor/bin diff --git a/plugins/django/django.plugin.zsh b/plugins/django/django.plugin.zsh index 9d898edca..aaaa7d21d 100644 --- a/plugins/django/django.plugin.zsh +++ b/plugins/django/django.plugin.zsh @@ -141,6 +141,7 @@ _managepy-sqlinitialdata(){} _managepy-sqlreset(){} _managepy-sqlsequencereset(){} _managepy-startapp(){} +_managepy-startproject(){} _managepy-syncdb() { _arguments -s : \ @@ -198,6 +199,7 @@ _managepy-commands() { 'sqlreset:Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).' 'sqlsequencereset:Prints the SQL statements for resetting sequences for the given app name(s).' "startapp:Creates a Django app directory structure for the given app name in this project's directory." + "startproject:Creates a Django project directory structure for the given project name in this current directory." "syncdb:Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created." 'test:Runs the test suite for the specified applications, or the entire site if no apps are specified.' 'testserver:Runs a development server with data from the given fixture(s).' diff --git a/plugins/docker/_docker b/plugins/docker/_docker index c291037a3..28568a6e5 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -214,7 +214,7 @@ __save() { __start() { _arguments \ '(-a,--attach=)'{-a,--attach=}'[Attach container''s stdout/stderr and forward all signals to the process]' \ - '(-i,--interactive=)'{-i, --interactive=}'[Attach container''s stdin]' + '(-i,--interactive=)'{-i,--interactive=}'[Attach container''s stdin]' __docker_containers } diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index 7352e5bad..a6e16ddf7 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -52,7 +52,7 @@ function extract() { (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; (*.Z) uncompress "$1" ;; - (*.zip|*.war|*.jar) unzip "$1" -d $extract_dir ;; + (*.zip|*.war|*.jar|*.sublime-package) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; (*.7z) 7za x "$1" ;; (*.deb) diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md new file mode 100644 index 000000000..32784d03b --- /dev/null +++ b/plugins/frontend-search/README.md @@ -0,0 +1,82 @@ +## Rationale ## + +The idea for this script is to help searches in important doc contents from frontend. + +## Instalation ## + +I will send a Pull Request with this plugin for .oh-my-zsh official repository. If accept them, it's only add in plugins list that exists in ```.zshrc``` file. + +For now, you can clone this repository and add in ```custom/plugins``` folder + +```bash +$ git clone git://github.com/willmendesneto/frontend-search.git ~/.oh-my-zsh/custom/plugins/frontend-search +``` + +After this, restart your terminal and frontend-search plugin is configurated in you CLI. + +```bash +... +plugins=( <your-plugins-list>... frontend-search) +... +``` + +## Commands ## + +All command searches are accept only in format + +* `frontend <search-content> <search-term>` + +The search content are + +* `jquery <api.jquery.com>` +* `mdn <developer.mozilla.org>` +* `compass <compass-style.org>` +* `html5please <html5please.com>` +* `caniuse <caniuse.com>` +* `aurajs <aurajs.com>` +* `dartlang <api.dartlang.org/apidocs/channels/stable/dartdoc-viewer>` +* `lodash <search>` +* `qunit <api.qunitjs.com>` +* `fontello <fontello.com>` +* `bootsnipp <bootsnipp.com>` +* `cssflow <cssflow.com>` +* `codepen <codepen.io>` +* `unheap <www.unheap.com>` +* `bem <google.com/search?as_q=<search-term>&as_sitesearch=bem.info>` +* `smacss <google.com/search?as_q=<search-term>&as_sitesearch=smacss.com>` +* `angularjs <google.com/search?as_q=<search-term>&as_sitesearch=angularjs.org>` +* `reactjs <google.com/search?as_q=<search-term>&as_sitesearch=facebook.github.io/react>` +* `emberjs <emberjs.com>` + + +## Aliases ## + +There are a few aliases presented as well: + +* `jquery` A shorthand for `frontend jquery` +* `mdn` A shorthand for `frontend mdn` +* `compass` A shorthand for `frontend compass` +* `html5please` A shorthand for `frontend html5please` +* `caniuse` A shorthand for `frontend caniuse` +* `aurajs` A shorthand for `frontend aurajs` +* `dartlang` A shorthand for `frontend dartlang` +* `lodash` A shorthand for `frontend lodash` +* `qunit` A shorthand for `frontend qunit` +* `fontello` A shorthand for `frontend fontello` +* `bootsnipp` A shorthand for `frontend bootsnipp` +* `cssflow` A shorthand for `frontend cssflow` +* `codepen` A shorthand for `frontend codepen` +* `unheap` A shorthand for `frontend unheap` +* `bem` A shorthand for `frontend bem` +* `smacss` A shorthand for `frontend smacss` +* `angularjs` A shorthand for `frontend angularjs` +* `reactjs` A shorthand for `frontend reactjs` +* `emberjs` A shorthand for `frontend emberjs` + +## Author + +**Wilson Mendes (willmendesneto)** ++ <https://twitter.com/willmendesneto> ++ <http://github.com/willmendesneto> + +New features comming soon. diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh new file mode 100644 index 000000000..38b1a80ea --- /dev/null +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -0,0 +1,151 @@ +# frontend from terminal + +function frontend() { + + # get the open command + local open_cmd + if [[ $(uname -s) == 'Darwin' ]]; then + open_cmd='open' + else + open_cmd='xdg-open' + fi + + # no keyword provided, simply show how call methods + if [[ $# -le 1 ]]; then + echo "Please provide a search-content and a search-term for app.\nEx:\nfrontend <search-content> <search-term>\n" + return 1 + fi + + # check whether the search engine is supported + if [[ ! $1 =~ '(jquery|mdn|compass|html5please|caniuse|aurajs|dartlang|qunit|fontello|bootsnipp|cssflow|codepen|unheap|bem|smacss|angularjs|reactjs|emberjs)' ]]; + then + echo "Search valid search content $1 not supported." + echo "Valid contents: (formats 'frontend <search-content>' or '<search-content>')" + echo "* jquery" + echo "* mdn" + echo "* compass" + echo "* html5please" + echo "* caniuse" + echo "* aurajs" + echo "* dartlang" + echo "* lodash" + echo "* qunit" + echo "* fontello" + echo "* bootsnipp" + echo "* cssflow" + echo "* codepen" + echo "* unheap" + echo "* bem" + echo "* smacss" + echo "* angularjs" + echo "* reactjs" + echo "* emberjs" + echo "" + + return 1 + fi + + local url="http://" + local query="" + + case "$1" in + "jquery") + url="${url}api.jquery.com" + url="${url}/?s=$2" ;; + "mdn") + url="${url}developer.mozilla.org" + url="${url}/search?q=$2" ;; + "compass") + url="${url}compass-style.org" + url="${url}/search?q=$2" ;; + "html5please") + url="${url}html5please.com" + url="${url}/#$2" ;; + "caniuse") + url="${url}caniuse.com" + url="${url}/#search=$2" ;; + "aurajs") + url="${url}aurajs.com" + url="${url}/api/#stq=$2" ;; + "dartlang") + url="${url}api.dartlang.org/apidocs/channels/stable/dartdoc-viewer" + url="${url}/dart-$2" ;; + "qunit") + url="${url}api.qunitjs.com" + url="${url}/?s=$2" ;; + "fontello") + url="${url}fontello.com" + url="${url}/#search=$2" ;; + "bootsnipp") + url="${url}bootsnipp.com" + url="${url}/search?q=$2" ;; + "cssflow") + url="${url}cssflow.com" + url="${url}/search?q=$2" ;; + "codepen") + url="${url}codepen.io" + url="${url}/search?q=$2" ;; + "unheap") + url="${url}www.unheap.com" + url="${url}/?s=$2" ;; + "bem") + url="${url}google.com" + url="${url}/search?as_q=$2&as_sitesearch=bem.info" ;; + "smacss") + url="${url}google.com" + url="${url}/search?as_q=$2&as_sitesearch=smacss.com" ;; + "angularjs") + url="${url}google.com" + url="${url}/search?as_q=$2&as_sitesearch=angularjs.org" ;; + "reactjs") + url="${url}google.com" + url="${url}/search?as_q=$2&as_sitesearch=facebook.github.io/react" ;; + "emberjs") + url="${url}emberjs.com" + url="${url}/api/#stq=$2&stp=1" ;; + *) echo "INVALID PARAM!" + return ;; + esac + + echo "$url" + + $open_cmd "$url" + +} + +# javascript +alias jquery='frontend jquery' +alias mdn='frontend mdn' + +# pre processors frameworks +alias compass='frontend compass' + +# important links +alias html5please='frontend html5please' +alias caniuse='frontend caniuse' + +# components and libraries +alias aurajs='frontend aurajs' +alias dartlang='frontend dartlang' +alias lodash='frontend lodash' + +#tests +alias qunit='frontend qunit' + +#fonts +alias fontello='frontend fontello' + +# snippets +alias bootsnipp='frontend bootsnipp' +alias cssflow='frontend cssflow' +alias codepen='frontend codepen' +alias unheap='frontend unheap' + +# css architecture +alias bem='frontend bem' +alias smacss='frontend smacss' + +# frameworks +alias angularjs='frontend angularjs' +alias reactjs='frontend reactjs' +alias emberjs='frontend emberjs' diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 256841432..c665a9ee1 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # -*- coding: UTF-8 -*- from subprocess import Popen, PIPE import re diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh index 25b1a1e1b..bd69b1bd5 100644 --- a/plugins/github/github.plugin.zsh +++ b/plugins/github/github.plugin.zsh @@ -40,7 +40,7 @@ fi # # Use this when creating a new repo from scratch. empty_gh() { # [NAME_OF_REPO] - repo = $1 + repo=$1 ghuser=$( git config github.user ) mkdir "$repo" diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh index 18bcaaff2..f2be6ca9c 100644 --- a/plugins/golang/golang.plugin.zsh +++ b/plugins/golang/golang.plugin.zsh @@ -158,3 +158,6 @@ __go_tool_complete() { } compdef __go_tool_complete go + +# aliases +alias gfa='go fmt . ./...' diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh index 9229512f7..97bf50b43 100644 --- a/plugins/gradle/gradle.plugin.zsh +++ b/plugins/gradle/gradle.plugin.zsh @@ -60,7 +60,7 @@ function in_gradle() { ############################################################################ _gradle_does_task_list_need_generating () { [ ! -f .gradletasknamecache ] && return 0; - [ .gradletasknamecache -nt build.gradle ] && return 0; + [ build.gradle -nt .gradletasknamecache ] && return 0; return 1; } diff --git a/plugins/grails/grails.plugin.zsh b/plugins/grails/grails.plugin.zsh index 11777738c..11777738c 100755..100644 --- a/plugins/grails/grails.plugin.zsh +++ b/plugins/grails/grails.plugin.zsh diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 739ee7142..3d510e430 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -29,15 +29,23 @@ open_jira_issue () { return 0 fi + if [ -f .jira-prefix ]; then + jira_prefix=$(cat .jira-prefix) + elif [ -f ~/.jira-prefix ]; then + jira_prefix=$(cat ~/.jira-prefix) + else + jira_prefix="" + fi + if [ -z "$1" ]; then echo "Opening new issue" $open_cmd "$jira_url/secure/CreateIssue!default.jspa" else echo "Opening issue #$1" if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then - $open_cmd "$jira_url/issues/$1" + $open_cmd "$jira_url/issues/$jira_prefix$1" else - $open_cmd "$jira_url/browse/$1" + $open_cmd "$jira_url/browse/$jira_prefix$1" fi fi } diff --git a/plugins/jruby/jruby.plugin.zsh b/plugins/jruby/jruby.plugin.zsh index bb7975b10..bb7975b10 100755..100644 --- a/plugins/jruby/jruby.plugin.zsh +++ b/plugins/jruby/jruby.plugin.zsh diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index 5096879d8..1b23b5d42 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -39,7 +39,7 @@ marks() { _completemarks() { if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then - reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_\da-zA-Z\-]*):$/\2/g')) + reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_a-zA-Z0-9\.\-]*):$/\2/g')) else if readlink -e "${MARKPATH}"/* &>/dev/null; then reply=($(ls "${MARKPATH}")) diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index 2e99a12fb..ff95d5e40 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -16,6 +16,8 @@ alias hgs='hg status' alias hgsl='hg log --limit 20 --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n" ' # this is the 'git commit --amend' equivalent alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip' +# list unresolved files (since hg does not list unmerged files in the status command) +alias hgun='hg resolve --list' function in_hg() { if [[ -d .hg ]] || $(hg summary > /dev/null 2>&1); then diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index ed7968534..2b7683078 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -44,19 +44,22 @@ mvn-color() # aliases alias mvncie='mvn clean install eclipse:eclipse' alias mvnci='mvn clean install' +alias mvncist='mvn clean install -DskipTests' alias mvne='mvn eclipse:eclipse' alias mvnce='mvn clean eclipse:clean eclipse:eclipse' alias mvnd='mvn deploy' alias mvnp='mvn package' alias mvnc='mvn clean' alias mvncom='mvn compile' +alias mvnct='mvn clean test' alias mvnt='mvn test' alias mvnag='mvn archetype:generate' alias mvn-updates='mvn versions:display-dependency-updates' alias mvntc7='mvn tomcat7:run' alias mvntc='mvn tomcat:run' alias mvnjetty='mvn jetty:run' - +alias mvndt='mvn dependency:tree' +alias mvns='mvn site' function listMavenCompletions { reply=( diff --git a/plugins/pip/_pip b/plugins/pip/_pip index 9892dd19c..cb155e5f4 100644 --- a/plugins/pip/_pip +++ b/plugins/pip/_pip @@ -1,4 +1,4 @@ -#compdef pip +#compdef pip pip2 pip-2.7 pip3 pip-3.2 pip-3.3 pip-3.4 #autoload # pip zsh completion, based on homebrew completion diff --git a/plugins/postgres/postgres.plugin.zsh b/plugins/postgres/postgres.plugin.zsh index cdd142e92..c2dbef244 100644 --- a/plugins/postgres/postgres.plugin.zsh +++ b/plugins/postgres/postgres.plugin.zsh @@ -1,6 +1,8 @@ -# Aliases to stop, start and restart Postgres -# Paths noted below are for Postgress installed via Homebrew on OSX +# Aliases to control Postgres +# Paths noted below are for Postgres installed via Homebrew on OSX alias startpost='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' alias stoppost='pg_ctl -D /usr/local/var/postgres stop -s -m fast' -alias restartpost='stoppost && sleep 1 && startpost'
\ No newline at end of file +alias restartpost='stoppost && sleep 1 && startpost' +alias reloadpost='pg_ctl reload -D /usr/local/var/postgres -s' +alias statuspost='pg_ctl status -D /usr/local/var/postgres -s'
\ No newline at end of file diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index b6795b91c..213e1beb0 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -7,7 +7,7 @@ _rbenv-from-homebrew-installed() { } FOUND_RBENV=0 -rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv") +rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv") if _homebrew-installed && _rbenv-from-homebrew-installed ; then rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}") fi diff --git a/plugins/repo/repo.plugin.zsh b/plugins/repo/repo.plugin.zsh index d690a9d22..33f4195c7 100644 --- a/plugins/repo/repo.plugin.zsh +++ b/plugins/repo/repo.plugin.zsh @@ -10,3 +10,9 @@ compdef _repo rs='repo sync' alias rsrra='repo sync ; repo rebase --auto-stash' compdef _repo rsrra='repo sync ; repo rebase --auto-stash' + +alias ru='repo upload' +compdef _repo ru='repo upload' + +alias rst='repo status' +compdef _repo rst='repo status' diff --git a/plugins/rsync/rsync.plugin.zsh b/plugins/rsync/rsync.plugin.zsh index 33a31a5c1..1a3bb4cc3 100644 --- a/plugins/rsync/rsync.plugin.zsh +++ b/plugins/rsync/rsync.plugin.zsh @@ -1,4 +1,4 @@ -alias rsync-copy="rsync -av --progress -h" -alias rsync-move="rsync -av --progress -h --remove-source-files" -alias rsync-update="rsync -avu --progress -h" -alias rsync-synchronize="rsync -avu --delete --progress -h" +alias rsync-copy="rsync -avz --progress -h" +alias rsync-move="rsync -avz --progress -h --remove-source-files" +alias rsync-update="rsync -avzu --progress -h" +alias rsync-synchronize="rsync -avzu --delete --progress -h" diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 3bde154df..ad23e18d7 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -6,6 +6,7 @@ alias gemsets='rvm gemset list' local ruby18='ruby-1.8.7' local ruby19='ruby-1.9.3' local ruby20='ruby-2.0.0' +local ruby21='ruby-2.1.1' function rb18 { if [ -z "$1" ]; then @@ -40,6 +41,17 @@ function rb20 { _rb20() {compadd `ls -1 $rvm_path/gems | grep "^$ruby20@" | sed -e "s/^$ruby20@//" | awk '{print $1}'`} compdef _rb20 rb20 +function rb21 { + if [ -z "$1" ]; then + rvm use "$ruby21" + else + rvm use "$ruby21@$1" + fi +} + +_rb21() {compadd `ls -1 $rvm_path/gems | grep "^$ruby21@" | sed -e "s/^$ruby21@//" | awk '{print $1}'`} +compdef _rb21 rb21 + function rvm-update { rvm get head } diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 2fb8d5462..610ad34dc 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -1,7 +1,7 @@ # # INSTRUCTIONS # -# To enabled agent forwarding support add the following to +# To enable agent forwarding support add the following to # your .zshrc file: # # zstyle :omz:plugins:ssh-agent agent-forwarding on diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index a2042343a..438f386fb 100755..100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -7,6 +7,7 @@ if [[ $('uname') == 'Linux' ]]; then "/opt/sublime_text/sublime_text" "/usr/bin/sublime_text" "/usr/local/bin/sublime_text" + "/usr/bin/subl" ) for _sublime_path in $_sublime_linux_paths; do if [[ -a $_sublime_path ]]; then diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 0d2bb68c3..4c07349a4 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -17,5 +17,6 @@ compdef _symfony2 sf alias sf='php app/console' alias sfcl='php app/console cache:clear' alias sfroute='php app/console router:debug' +alias sfcontainer='php app/console container:debug' alias sfgb='php app/console generate:bundle' diff --git a/plugins/systemadmin/systemadmin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index f5e44c66f..f5e44c66f 100644 --- a/plugins/systemadmin/systemadmin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index e05b16f81..9ddfa1be7 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -8,6 +8,8 @@ _1st_arguments=( 'box:Box commands' 'connect:Connects to a shared, remote Vagrant environment' 'destroy:Destroys the vagrant environment' + 'docker-logs:Shows Docker logs' + 'docker-run:Run one-off commands against a Docker container' 'global-status:Reports the status of all active Vagrant environments on the system' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' diff --git a/plugins/vundle/vundle.plugin.zsh b/plugins/vundle/vundle.plugin.zsh index 936c8d7d2..830774fe3 100644 --- a/plugins/vundle/vundle.plugin.zsh +++ b/plugins/vundle/vundle.plugin.zsh @@ -4,7 +4,7 @@ function vundle-init () { mkdir -p ~/.vim/bundle/vundle/ fi - if [ ! -d ~/.vim/bundle/vundle/.git/ ] + if [ ! -d ~/.vim/bundle/vundle/.git ] && [ ! -f ~/.vim/bundle/vundle/.git ] then git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle echo "\n\tRead about vim configuration for vundle at https://github.com/gmarik/vundle\n" diff --git a/plugins/wd/wd.plugin.zsh b/plugins/wd/wd.plugin.zsh index 9800335fc..9800335fc 100755..100644 --- a/plugins/wd/wd.plugin.zsh +++ b/plugins/wd/wd.plugin.zsh diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index 96a3426fc..9ebad6808 100755 --- a/plugins/wd/wd.sh +++ b/plugins/wd/wd.sh @@ -58,7 +58,7 @@ wd_warp() #wd_print_msg $BLUE "Warping..." cd ${points[$1]} else - wd_print_msg $RED "Unkown warp point '$1'" + wd_print_msg $RED "Unknown warp point '$1'" fi } diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 4816ab0ed..e59bee8c7 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -1,6 +1,6 @@ #xc function courtesy of http://gist.github.com/subdigital/5420709 function xc { - xcode_proj=`find . -name "*.xc*" -d 1 | sort -r | head -1` + xcode_proj=`ls | grep "\.xc" | sort -r | head -1` if [[ `echo -n $xcode_proj | wc -m` == 0 ]] then echo "No xcworkspace/xcodeproj file found in the current directory." |