summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/atom/atom.plugin.zsh4
-rw-r--r--plugins/cabal/cabal.plugin.zsh11
-rw-r--r--plugins/gitignore/gitignore.plugin.zsh6
-rw-r--r--plugins/pip/_pip4
-rw-r--r--plugins/rails/rails.plugin.zsh1
-rw-r--r--plugins/rake/rake.plugin.zsh4
-rw-r--r--plugins/rbenv/rbenv.plugin.zsh8
-rw-r--r--plugins/svn-fast-info/svn-fast-info.plugin.zsh73
-rw-r--r--plugins/xcode/xcode.plugin.zsh1
9 files changed, 108 insertions, 4 deletions
diff --git a/plugins/atom/atom.plugin.zsh b/plugins/atom/atom.plugin.zsh
new file mode 100644
index 000000000..048fd7521
--- /dev/null
+++ b/plugins/atom/atom.plugin.zsh
@@ -0,0 +1,4 @@
+#
+# Your guess is as good as mine. Let's just assume that we will need this...
+# - For more info visit... http://atom.io/
+# \ No newline at end of file
diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh
index 8d3c64587..9f76add7a 100644
--- a/plugins/cabal/cabal.plugin.zsh
+++ b/plugins/cabal/cabal.plugin.zsh
@@ -1,3 +1,14 @@
+function cabal_sandbox_info() {
+ cabal_files=(*.cabal(N))
+ if [ $#cabal_files -gt 0 ]; then
+ if [ -f cabal.sandbox.config ]; then
+ echo "%{$fg[green]%}sandboxed%{$reset_color%}"
+ else
+ echo "%{$fg[red]%}not sandboxed%{$reset_color%}"
+ fi
+ fi
+}
+
function _cabal_commands() {
local ret=1 state
_arguments ':subcommand:->subcommand' && ret=0
diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh
index 332497cec..be037d87a 100644
--- a/plugins/gitignore/gitignore.plugin.zsh
+++ b/plugins/gitignore/gitignore.plugin.zsh
@@ -1,7 +1,7 @@
-function gi() { curl http://gitignore.io/api/$@ ;}
+function gi() { curl http://www.gitignore.io/api/$@ ;}
_gitignireio_get_command_list() {
- curl -s http://gitignore.io/api/list | tr "," "\n"
+ curl -s http://www.gitignore.io/api/list | tr "," "\n"
}
_gitignireio () {
@@ -9,4 +9,4 @@ _gitignireio () {
compadd -S '' `_gitignireio_get_command_list`
}
-compdef _gitignireio gi \ No newline at end of file
+compdef _gitignireio gi
diff --git a/plugins/pip/_pip b/plugins/pip/_pip
index 967da48ca..7c1238db7 100644
--- a/plugins/pip/_pip
+++ b/plugins/pip/_pip
@@ -20,6 +20,7 @@ _1st_arguments=(
'bundle:create pybundles (archives containing multiple packages)'
'freeze:output all currently installed packages (exact versions) to stdout'
'help:show available commands'
+ 'show:show information about installed packages'
'install:install packages'
'search:search PyPI'
'uninstall:uninstall packages'
@@ -76,4 +77,7 @@ case "$words[1]" in
uninstall)
_pip_installed
_wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;;
+ show)
+ _pip_installed
+ _wanted installed_pkgs expl 'installed packages' compadd -a installed_pkgs ;;
esac
diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh
index 23d15a9a1..4a96754e4 100644
--- a/plugins/rails/rails.plugin.zsh
+++ b/plugins/rails/rails.plugin.zsh
@@ -51,6 +51,7 @@ alias rds='rake db:seed'
alias rdd='rake db:drop'
alias rdtc='rake db:test:clone'
alias rdtp='rake db:test:prepare'
+alias rdmtc='rake db:migrate db:test:clone'
alias rlc='rake log:clear'
alias rn='rake notes'
diff --git a/plugins/rake/rake.plugin.zsh b/plugins/rake/rake.plugin.zsh
index 16b933c14..121150017 100644
--- a/plugins/rake/rake.plugin.zsh
+++ b/plugins/rake/rake.plugin.zsh
@@ -1,3 +1,7 @@
+# Thank you Jim for everything you contributed to the Ruby and open source community
+# over the years. We will miss you dearly.
+alias jimweirich="rake"
+
alias rake="noglob rake" # allows square brackts for rake task invocation
alias brake='noglob bundle exec rake' # execute the bundled rake gem
alias srake='noglob sudo rake' # noglob must come before sudo
diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh
index 78f76c3a3..57ae2ca1f 100644
--- a/plugins/rbenv/rbenv.plugin.zsh
+++ b/plugins/rbenv/rbenv.plugin.zsh
@@ -10,12 +10,18 @@ FOUND_RBENV=0
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv")
if _homebrew-installed && _rbenv-from-homebrew-installed ; then
rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
+ if [[ $RBENV_ROOT = '' ]]; then
+ RBENV_ROOT="$HOME/.rbenv"
+ fi
fi
for rbenvdir in "${rbenvdirs[@]}" ; do
if [ -d $rbenvdir/bin -a $FOUND_RBENV -eq 0 ] ; then
FOUND_RBENV=1
- export RBENV_ROOT=$rbenvdir
+ if [[ $RBENV_ROOT = '' ]]; then
+ RBENV_ROOT=$rbenvdir
+ fi
+ export RBENV_ROOT
export PATH=${rbenvdir}/bin:$PATH
eval "$(rbenv init --no-rehash - zsh)"
diff --git a/plugins/svn-fast-info/svn-fast-info.plugin.zsh b/plugins/svn-fast-info/svn-fast-info.plugin.zsh
new file mode 100644
index 000000000..ea19bcea0
--- /dev/null
+++ b/plugins/svn-fast-info/svn-fast-info.plugin.zsh
@@ -0,0 +1,73 @@
+# vim:ft=zsh ts=2 sw=2 sts=2 et
+#
+# Faster alternative to the current SVN plugin implementation.
+#
+# Works with svn 1.6, 1.7, 1.8.
+# Use `svn_prompt_info` method to enquire the svn data.
+# It's faster because his efficient use of svn (single svn call) which saves a lot on a huge codebase
+# It displays the current status of the local files (added, deleted, modified, replaced, or else...)
+#
+# Use as a drop-in replacement of the svn plugin not as complementary plugin
+
+function svn_prompt_info() {
+ local info
+ info=$(svn info 2>&1) || return 1; # capture stdout and stderr
+ local repo_need_upgrade=$(svn_repo_need_upgrade $info)
+
+ if [[ -n $repo_need_upgrade ]]; then
+ printf '%s%s%s%s%s%s%s\n' \
+ $ZSH_PROMPT_BASE_COLOR \
+ $ZSH_THEME_SVN_PROMPT_PREFIX \
+ $ZSH_PROMPT_BASE_COLOR \
+ $repo_need_upgrade \
+ $ZSH_PROMPT_BASE_COLOR \
+ $ZSH_THEME_SVN_PROMPT_SUFFIX \
+ $ZSH_PROMPT_BASE_COLOR
+ else
+ printf '%s%s%s %s%s:%s%s%s%s%s' \
+ $ZSH_PROMPT_BASE_COLOR \
+ $ZSH_THEME_SVN_PROMPT_PREFIX \
+ \
+ "$(svn_status_info $info)" \
+ $ZSH_PROMPT_BASE_COLOR \
+ \
+ $ZSH_THEME_BRANCH_NAME_COLOR \
+ $(svn_current_branch_name $info) \
+ $ZSH_PROMPT_BASE_COLOR \
+ \
+ $(svn_current_revision $info) \
+ $ZSH_PROMPT_BASE_COLOR \
+ \
+ $ZSH_THEME_SVN_PROMPT_SUFFIX \
+ $ZSH_PROMPT_BASE_COLOR
+ fi
+}
+
+function svn_repo_need_upgrade() {
+ grep -q "E155036" <<< ${1:-$(svn info 2> /dev/null)} && \
+ echo "E155036: upgrade repo with svn upgrade"
+}
+
+function svn_current_branch_name() {
+ grep '^URL:' <<< "${1:-$(svn info 2> /dev/null)}" | egrep -o '(tags|branches)/[^/]+|trunk'
+}
+
+function svn_repo_root_name() {
+ grep '^Repository\ Root:' <<< "${1:-$(svn info 2> /dev/null)}" | sed 's#.*/##'
+}
+
+function svn_current_revision() {
+ echo "${1:-$(svn info 2> /dev/null)}" | sed -n 's/Revision: //p'
+}
+
+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
+ echo $svn_status_string
+}
diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh
index f137253f3..4816ab0ed 100644
--- a/plugins/xcode/xcode.plugin.zsh
+++ b/plugins/xcode/xcode.plugin.zsh
@@ -16,3 +16,4 @@ function xcsel {
alias xcb='xcodebuild'
alias xcp='xcode-select --print-path'
+alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'