mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-01-09 02:24:03 +01:00
Merge branch 'master' of git://github.com/robbyrussell/oh-my-zsh
This commit is contained in:
commit
e4749df2e8
56 changed files with 1098 additions and 43 deletions
|
|
@ -3,6 +3,8 @@ if [ $commands[autojump] ]; then # check if autojump is installed
|
|||
. /usr/share/autojump/autojump.zsh
|
||||
elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
|
||||
. /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 ]; then # mac os x with brew
|
||||
. `brew --prefix`/etc/autojump
|
||||
fi
|
||||
|
|
|
|||
|
|
@ -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 rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails puma)
|
||||
|
||||
## Functions
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,30 @@
|
|||
function _cap_does_task_list_need_generating () {
|
||||
if [ ! -f .cap_tasks~ ]; then return 0;
|
||||
stat -f%m . > /dev/null 2>&1
|
||||
if [ "$?" = 0 ]; then
|
||||
stat_cmd=(stat -f%m)
|
||||
else
|
||||
stat_cmd=(stat -L --format=%y)
|
||||
fi
|
||||
|
||||
# Cache filename
|
||||
_cap_show_undescribed_tasks=0
|
||||
|
||||
# Cache filename
|
||||
_cap_task_cache_file='.cap_task_cache'
|
||||
|
||||
_cap_get_task_list () {
|
||||
if [ ${_cap_show_undescribed_tasks} -eq 0 ]; then
|
||||
cap -T | grep '^cap' | cut -d " " -f 2
|
||||
else
|
||||
accurate=$(stat -f%m .cap_tasks~)
|
||||
changed=$(stat -f%m config/deploy.rb)
|
||||
cap -vT | grep '^cap' | cut -d " " -f 2
|
||||
fi
|
||||
}
|
||||
|
||||
_cap_does_task_list_need_generating () {
|
||||
|
||||
if [ ! -f ${_cap_task_cache_file} ]; then return 0;
|
||||
else
|
||||
accurate=$($stat_cmd $_cap_task_cache_file)
|
||||
changed=$($stat_cmd config/deploy.rb)
|
||||
return $(expr $accurate '>=' $changed)
|
||||
fi
|
||||
}
|
||||
|
|
@ -10,12 +32,10 @@ function _cap_does_task_list_need_generating () {
|
|||
function _cap () {
|
||||
if [ -f config/deploy.rb ]; then
|
||||
if _cap_does_task_list_need_generating; then
|
||||
echo "\nGenerating .cap_tasks~..." > /dev/stderr
|
||||
cap show_tasks -q | cut -d " " -f 1 | sed -e '/^ *$/D' -e '1,2D'
|
||||
> .cap_tasks~
|
||||
_cap_get_task_list > ${_cap_task_cache_file}
|
||||
fi
|
||||
compadd `cat .cap_tasks~`
|
||||
compadd `cat ${_cap_task_cache_file}`
|
||||
fi
|
||||
}
|
||||
|
||||
compctl -K _cap cap
|
||||
compdef _cap cap
|
||||
|
|
|
|||
6
plugins/colemak/colemak-less
Normal file
6
plugins/colemak/colemak-less
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
n forw-line
|
||||
e back-line
|
||||
k repeat-search
|
||||
\ek repeat-search-all
|
||||
K reverse-search
|
||||
\eK reverse-search-all
|
||||
22
plugins/colemak/colemak.plugin.zsh
Normal file
22
plugins/colemak/colemak.plugin.zsh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# ctrl-j newline
|
||||
bindkey '^n' accept-line
|
||||
bindkey -a '^n' accept-line
|
||||
|
||||
# another rotation to match qwerty
|
||||
bindkey -a 'n' down-line-or-history
|
||||
bindkey -a 'e' up-line-or-history
|
||||
bindkey -a 'i' vi-forward-char
|
||||
|
||||
# make qwerty
|
||||
bindkey -a 'k' vi-repeat-search
|
||||
bindkey -a 'K' vi-rev-repeat-search
|
||||
bindkey -a 'u' vi-insert
|
||||
bindkey -a 'U' vi-insert-bol
|
||||
bindkey -a 'l' vi-undo-change
|
||||
bindkey -a 'N' vi-join
|
||||
|
||||
# spare
|
||||
bindkey -a 'j' vi-forward-word-end
|
||||
bindkey -a 'J' vi-forward-blank-word-end
|
||||
|
||||
lesskey $ZSH_CUSTOM/plugins/colemak/colemak-less
|
||||
29
plugins/composer/composer.plugin.zsh
Normal file
29
plugins/composer/composer.plugin.zsh
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
# ------------------------------------------------------------------------------
|
||||
# FILE: composer.plugin.zsh
|
||||
# DESCRIPTION: oh-my-zsh composer plugin file.
|
||||
# AUTHOR: Daniel Gomes (me@danielcsgomes.com)
|
||||
# VERSION: 1.0.0
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# Composer basic command completion
|
||||
_composer_get_command_list () {
|
||||
composer --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }'
|
||||
}
|
||||
|
||||
_composer () {
|
||||
if [ -f composer.json ]; then
|
||||
compadd `_composer_get_command_list`
|
||||
fi
|
||||
}
|
||||
|
||||
compdef _composer composer
|
||||
|
||||
# Aliases
|
||||
alias c='composer'
|
||||
alias csu='composer self-update'
|
||||
alias cu='composer update'
|
||||
alias ci='composer install'
|
||||
alias ccp='composer create-project'
|
||||
|
||||
# install composer in the current directory
|
||||
alias cget='curl -s https://getcomposer.org/installer | php'
|
||||
10
plugins/dircycle/dircycle.plugin.zsh
Normal file
10
plugins/dircycle/dircycle.plugin.zsh
Normal file
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
|
|||
2
plugins/encode64/encode64.plugin.zsh
Normal file
2
plugins/encode64/encode64.plugin.zsh
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
encode64(){ echo -n $1 | base64 }
|
||||
decode64(){ echo -n $1 | base64 -D }
|
||||
6
plugins/fasd/fasd.plugin.zsh
Normal file
6
plugins/fasd/fasd.plugin.zsh
Normal file
|
|
@ -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
|
||||
|
||||
|
|
@ -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'
|
||||
;;
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
compdef ggpnp=git
|
||||
|
|
|
|||
22
plugins/jira/jira.plugin.zsh
Normal file
22
plugins/jira/jira.plugin.zsh
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
# To use: add a .jira-url file in the base of your project
|
||||
# Setup: cd to/my/project
|
||||
# echo "https://name.jira.com" >> .jira-url
|
||||
# Usage: jira # opens a new issue
|
||||
# jira ABC-123 # Opens an existing issue
|
||||
open_jira_issue () {
|
||||
if [ ! -f .jira-url ]; then
|
||||
echo "There is no .jira-url file in the current directory..."
|
||||
return 0;
|
||||
else
|
||||
jira_url=$(cat .jira-url);
|
||||
if [ -z "$1" ]; then
|
||||
echo "Opening new issue";
|
||||
`open $jira_url/secure/CreateIssue!default.jspa`;
|
||||
else
|
||||
echo "Opening issue #$1";
|
||||
`open $jira_url/issues/$1`;
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
alias jira='open_jira_issue'
|
||||
4
plugins/jruby/jruby.plugin.zsh
Executable file
4
plugins/jruby/jruby.plugin.zsh
Executable file
|
|
@ -0,0 +1,4 @@
|
|||
# Aliases
|
||||
alias jrspec='jruby --debug -S rspec --debug'
|
||||
alias jprofile='jruby --profile.api -S rspec'
|
||||
alias jexec='jruby -S'
|
||||
40
plugins/laravel/_artisan
Normal file
40
plugins/laravel/_artisan
Normal file
|
|
@ -0,0 +1,40 @@
|
|||
#compdef artisan
|
||||
|
||||
# Laravel autocompletion
|
||||
# Author: John Hamelink <john@johnhamelink.com>
|
||||
#
|
||||
# This plugin does the following:
|
||||
# - Adds aliases and autocompletion for artisan
|
||||
# - Adds aliases and autocompletion for bob
|
||||
|
||||
local curcontext="$curcontext" state line _opts _bundles ret=1
|
||||
_arguments -C \
|
||||
'1: :->cmds' \
|
||||
'*:: :->args' && ret=0
|
||||
|
||||
case $state in
|
||||
cmds)
|
||||
|
||||
_values "Artisan command" \
|
||||
'session\:install[Create a session table]' \
|
||||
'migrate[Manage Migrations]' \
|
||||
'test[Run a test]' \
|
||||
'route\:\:call[Call a route in the CLI]' \
|
||||
'key\:\:generate[Generate a key]'
|
||||
ret=0
|
||||
;;
|
||||
args)
|
||||
case $line[1] in
|
||||
migrate)
|
||||
_values \
|
||||
'install[Create the Laravel migration table' \
|
||||
'make[Create a migration]' \
|
||||
'rollback[Roll back to the last migration operation]' \
|
||||
'reset[Roll back all migrations that have ever run]'
|
||||
ret=0
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
return ret
|
||||
3
plugins/laravel/laravel.plugin.zsh
Normal file
3
plugins/laravel/laravel.plugin.zsh
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
#!zsh
|
||||
alias artisan='php artisan'
|
||||
alias bob='php artisan bob::build'
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
6
plugins/mvn/mvn.plugin.zsh
Normal file
6
plugins/mvn/mvn.plugin.zsh
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
function listMavenCompletions {
|
||||
reply=(
|
||||
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
|
||||
44
plugins/nanoc/_nanoc
Normal file
44
plugins/nanoc/_nanoc
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
#compdef nanoc
|
||||
#autoload
|
||||
|
||||
# nanoc zsh completion - based on the homebrew zsh completion
|
||||
# requires the 'nanoc' gem to be installed
|
||||
|
||||
local -a _1st_arguments
|
||||
_1st_arguments=(
|
||||
'autocompile:start the autocompiler'
|
||||
'compile:compile items of this site'
|
||||
'create-item:create an item'
|
||||
'create-layout:create a layout'
|
||||
'create-site:create a site'
|
||||
'deploy:deploy the compiled site'
|
||||
'help:show help'
|
||||
'prune:remove files not managed by nanoc from the output directory'
|
||||
'show-data:show data in this site'
|
||||
'show-plugins:show all available plugins'
|
||||
'show-rules:describe the rules for each item'
|
||||
'update:update the data stored by the data source to a newer version'
|
||||
'validate-css:validate the site’s CSS'
|
||||
'validate-html:validate the site’s HTML'
|
||||
'validate-links:validate links in site'
|
||||
'view:start the web server that serves static files'
|
||||
'watch:start the watcher'
|
||||
)
|
||||
|
||||
local expl
|
||||
local -a pkgs installed_pkgs
|
||||
|
||||
_arguments \
|
||||
'(--color)--color[enable color]' \
|
||||
'(--debug)--debug[enable debugging]' \
|
||||
'(--help)--help[show the help message and quit]' \
|
||||
'(--no-color)--no-color[disable color]' \
|
||||
'(--verbose)--verbose[make nanoc output more detailed]' \
|
||||
'(--version)--version[show version information and quit]' \
|
||||
'(--warn)--warn[enable warnings]' \
|
||||
'*:: :->subcmds' && return 0
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands "nanoc subcommand" _1st_arguments
|
||||
return
|
||||
fi
|
||||
9
plugins/nanoc/nanoc.plugin.zsh
Normal file
9
plugins/nanoc/nanoc.plugin.zsh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
alias n='nanoc'
|
||||
alias na='nanoc autocompile'
|
||||
alias nco='nanoc compile'
|
||||
alias nci='nanoc create_item'
|
||||
alias ncl='nanoc create_layout'
|
||||
alias ncs='nanoc create_site'
|
||||
alias nd='nanoc deploy'
|
||||
alias nv='nanoc view'
|
||||
alias nw='nanoc watch'
|
||||
148
plugins/per-directory-history/per-directory-history.plugin.zsh
Normal file
148
plugins/per-directory-history/per-directory-history.plugin.zsh
Normal file
|
|
@ -0,0 +1,148 @@
|
|||
#!/usr/bin/env zsh
|
||||
#
|
||||
# This is a implementation of per directory history for zsh, some
|
||||
# implementations of which exist in bash[1,2]. It also implements
|
||||
# a per-directory-history-toggle-history function to change from using the
|
||||
# directory history to using the global history. In both cases the history is
|
||||
# always saved to both the global history and the directory history, so the
|
||||
# toggle state will not effect the saved histories. Being able to switch
|
||||
# between global and directory histories on the fly is a novel feature as far
|
||||
# as I am aware.
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
# Configuration
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# HISTORY_BASE a global variable that defines the base directory in which the
|
||||
# directory histories are stored
|
||||
#
|
||||
#-------------------------------------------------------------------------------
|
||||
# History
|
||||
#-------------------------------------------------------------------------------
|
||||
#
|
||||
# The idea/inspiration for a per directory history is from Stewart MacArthur[1]
|
||||
# and Dieter[2], the implementation idea is from Bart Schaefer on the the zsh
|
||||
# mailing list[3]. The implementation is by Jim Hester in September 2012.
|
||||
#
|
||||
# [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html
|
||||
# [2]: http://dieter.plaetinck.be/per_directory_bash
|
||||
# [3]: http://www.zsh.org/mla/users/1997/msg00226.html
|
||||
#
|
||||
################################################################################
|
||||
#
|
||||
# Copyright (c) 2012 Jim Hester
|
||||
#
|
||||
# This software is provided 'as-is', without any express or implied warranty.
|
||||
# In no event will the authors be held liable for any damages arising from the
|
||||
# use of this software.
|
||||
#
|
||||
# Permission is granted to anyone to use this software for any purpose,
|
||||
# including commercial applications, and to alter it and redistribute it
|
||||
# freely, subject to the following restrictions:
|
||||
#
|
||||
# 1. The origin of this software must not be misrepresented; you must not claim
|
||||
# that you wrote the original software. If you use this software in a product,
|
||||
# an acknowledgment in the product documentation would be appreciated but is
|
||||
# not required.
|
||||
#
|
||||
# 2. Altered source versions must be plainly marked as such, and must not be
|
||||
# misrepresented as being the original software.
|
||||
#
|
||||
# 3. This notice may not be removed or altered from any source distribution..
|
||||
#
|
||||
################################################################################
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# configuration, the base under which the directory histories are stored
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
[[ -z $HISTORY_BASE ]] && HISTORY_BASE="$HOME/.directory_history"
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# toggle global/directory history used for searching - ctrl-G by default
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
function per-directory-history-toggle-history() {
|
||||
if [[ $_per_directory_history_is_global == true ]]; then
|
||||
_per-directory-history-set-directory-history
|
||||
echo "using local history\n"
|
||||
else
|
||||
_per-directory-history-set-global-history
|
||||
echo "using global history\n"
|
||||
fi
|
||||
zle reset-prompt
|
||||
}
|
||||
|
||||
autoload per-directory-history-toggle-history
|
||||
zle -N per-directory-history-toggle-history
|
||||
bindkey '^G' per-directory-history-toggle-history
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
# implementation details
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
_per_directory_history_directory="$HISTORY_BASE${PWD:A}/history"
|
||||
|
||||
function _per-directory-history-change-directory() {
|
||||
_per_directory_history_directory="$HISTORY_BASE${PWD:A}/history"
|
||||
mkdir -p ${_per_directory_history_directory:h}
|
||||
if [[ $_per_directory_history_is_global == false ]]; then
|
||||
#save to the global history
|
||||
fc -AI $HISTFILE
|
||||
#save history to previous file
|
||||
local prev="$HISTORY_BASE${OLDPWD:A}/history"
|
||||
mkdir -p ${prev:h}
|
||||
fc -AI $prev
|
||||
|
||||
#discard previous directory's history
|
||||
local original_histsize=$HISTSIZE
|
||||
HISTSIZE=0
|
||||
HISTSIZE=$original_histsize
|
||||
|
||||
#read history in new file
|
||||
if [[ -e $_per_directory_history_directory ]]; then
|
||||
fc -R $_per_directory_history_directory
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
function _per-directory-history-addhistory() {
|
||||
print -sr -- ${1%%$'\n'}
|
||||
fc -p $_per_directory_history_directory
|
||||
}
|
||||
|
||||
|
||||
function _per-directory-history-set-directory-history() {
|
||||
if [[ $_per_directory_history_is_global == true ]]; then
|
||||
fc -AI $HISTFILE
|
||||
local original_histsize=$HISTSIZE
|
||||
HISTSIZE=0
|
||||
HISTSIZE=$original_histsize
|
||||
if [[ -e "$_per_directory_history_directory" ]]; then
|
||||
fc -R "$_per_directory_history_directory"
|
||||
fi
|
||||
fi
|
||||
_per_directory_history_is_global=false
|
||||
}
|
||||
function _per-directory-history-set-global-history() {
|
||||
if [[ $_per_directory_history_is_global == false ]]; then
|
||||
fc -AI $_per_directory_history_directory
|
||||
local original_histsize=$HISTSIZE
|
||||
HISTSIZE=0
|
||||
HISTSIZE=$original_histsize
|
||||
if [[ -e "$HISTFILE" ]]; then
|
||||
fc -R "$HISTFILE"
|
||||
fi
|
||||
fi
|
||||
_per_directory_history_is_global=true
|
||||
}
|
||||
|
||||
|
||||
#add functions to the exec list for chpwd and zshaddhistory
|
||||
chpwd_functions=(${chpwd_functions[@]} "_per-directory-history-change-directory")
|
||||
zshaddhistory_functions=(${zshaddhistory_functions[@]} "_per-directory-history-addhistory")
|
||||
|
||||
#start in directory mode
|
||||
mkdir -p ${_per_directory_history_directory:h}
|
||||
_per_directory_history_is_global=true
|
||||
_per-directory-history-set-directory-history
|
||||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -1,10 +1,23 @@
|
|||
_homebrew-installed() {
|
||||
type brew &> /dev/null
|
||||
}
|
||||
|
||||
_rbenv-from-homebrew-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 _homebrew-installed && _rbenv-from-homebrew-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
|
||||
export PATH=${rbenvdir}/bin:$PATH
|
||||
eval "$(rbenv init -)"
|
||||
eval "$(rbenv init - zsh)"
|
||||
|
||||
alias rubies="rbenv versions"
|
||||
alias gemsets="rbenv gemset list"
|
||||
|
|
|
|||
42
plugins/rbfu/rbfu.plugin.zsh
Normal file
42
plugins/rbfu/rbfu.plugin.zsh
Normal file
|
|
@ -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
|
||||
54
plugins/screen/screen.plugin.zsh
Normal file
54
plugins/screen/screen.plugin.zsh
Normal file
|
|
@ -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/^\/home\//~/;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
|
||||
8
plugins/sublime/sublime.plugin.zsh
Normal file → Executable file
8
plugins/sublime/sublime.plugin.zsh
Normal file → Executable file
|
|
@ -1,3 +1,9 @@
|
|||
# Sublime Text 2 Aliases
|
||||
alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
|
||||
#unamestr = 'uname'
|
||||
|
||||
if [[ $('uname') == 'Linux' ]]; then
|
||||
alias st='/usr/bin/sublime_text&'
|
||||
elif [[ $('uname') == 'Darwin' ]]; then
|
||||
alias st='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl'
|
||||
fi
|
||||
alias stt='st .'
|
||||
|
|
|
|||
136
plugins/supervisor/_supervisorctl
Normal file
136
plugins/supervisor/_supervisorctl
Normal file
|
|
@ -0,0 +1,136 @@
|
|||
#compdef supervisorctl
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
|
||||
_supervisorctl() {
|
||||
_arguments -s -S \
|
||||
{--configuration,-c}"[configuration file path (default /etc/supervisor.conf)]:FILENAME:_files" \
|
||||
{--help,-h}"[print usage message and exit]:" \
|
||||
{--interactive,-i}"[start an interactive shell after executing commands]" \
|
||||
{--serverurl,-s}"[URL on which supervisord server is listening (default "http://localhost:9001").]" \
|
||||
{--username,-u}"[username to use for authentication with server]:USERNAME:_users" \
|
||||
{--password,-p}"[password to use for authentication with server]:PASSWORD:" \
|
||||
{--history-file,-r}"[keep a readline history (if readline is available)]:FILENAME:_files" \
|
||||
"*::supervisorctl commands:_supervisorctl_command"
|
||||
}
|
||||
|
||||
(( $+functions[_supervisorctl_command] )) ||
|
||||
_supervisorctl_command() {
|
||||
local cmd ret=1
|
||||
|
||||
(( $+supervisorctl_cmds )) || _supervisorctl_cmds=(
|
||||
"add:Activates any updates in config for process/group" \
|
||||
"avail:Display all configured processes" \
|
||||
"clear:Clear process/multiple-process/all-process log files" \
|
||||
"exit:Exit the supervisor shell." \
|
||||
"fg:Connect to a process in foreground mode" \
|
||||
"maintail:tail of supervisor main log file" \
|
||||
"open:Connect to a remote supervisord process. (for UNIX domain socket, use unix:///socket/path)" \
|
||||
"pid:Get the PID of supervisord." \
|
||||
"quit:Exit the supervisor shell." \
|
||||
"reload:Restart the remote supervisord." \
|
||||
"remove:Removes process/group from active config" \
|
||||
"reread:Reload the daemon's configuration files" \
|
||||
"restart:Restart process or group." \
|
||||
"shutdown:Shut the remote supervisord down." \
|
||||
"start:Start process or groups." \
|
||||
"status:Get process status info." \
|
||||
"stop:Stop process or group." \
|
||||
"tail:tail of process stdout" \
|
||||
"update:Reload config and add/remove as necessary" \
|
||||
"version:Show the version of the remote supervisord process" \
|
||||
"help:Show help" \
|
||||
)
|
||||
|
||||
if (( CURRENT == 1 )); then
|
||||
_describe -t commands 'supervisorctl subcommand' _supervisorctl_cmds \
|
||||
|| compadd "$@" - ${(s.:.)${(j.:.)_supervisorctl_syns}}
|
||||
else
|
||||
local curcontext="$curcontext"
|
||||
|
||||
cmd="${${_supervisorctl_cmds[(r)$words[1]:*]%%:*}:-${(k)_supervisorctl_syns[(r)(*:|)$words[1](:*|)]}}"
|
||||
if (( $#cmd )); then
|
||||
curcontext="${curcontext%:*:*}:supervisorctl-${cmd}:"
|
||||
_call_function ret _supervisorctl_$cmd || _message 'no more arguments'
|
||||
else
|
||||
_message "unknown supervisorctl command: $words[1]"
|
||||
fi
|
||||
return ret
|
||||
fi
|
||||
}
|
||||
|
||||
# get supervisor contoroll processes
|
||||
(( $+functions[_get_supervisor_procs] )) ||
|
||||
_get_supervisor_procs() {
|
||||
local cache_policy
|
||||
zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
|
||||
if [[ -z "$cache_policy" ]]; then
|
||||
zstyle ":completion:${curcontext}:" cache-policy _supervisor_procs_caching_policy
|
||||
fi
|
||||
|
||||
if ( [[ ${+_supervisor_procs} -eq 0 ]] || _cache_invalid supervisor_procs ) \
|
||||
&& ! _retrieve_cache supervisor_procs; then
|
||||
|
||||
_supervisor_procs=(${${(f)"$(supervisorctl status >/dev/null 2>&1 | awk -F' ' '{print $1}')"}})
|
||||
_store_cache supervisor_procs _supervisor_procs
|
||||
fi
|
||||
|
||||
local expl
|
||||
_wanted supervisor_procs expl 'supervisor processes' compadd -a _supervisor_procs
|
||||
}
|
||||
|
||||
_supervisor_procs_caching_policy() {
|
||||
local -a oldp
|
||||
oldp=( "$1"(Nmw+1) )
|
||||
(( $#oldp ))
|
||||
}
|
||||
|
||||
(( $+functions[_supervisorctl_add] )) ||
|
||||
_supervisorctl_add() {
|
||||
_arguments -s \
|
||||
"--help[use help system]" \
|
||||
"*::supervisorctl commands:_supervisorctl"
|
||||
}
|
||||
|
||||
(( $+functions[_supervisorctl_help] )) ||
|
||||
_supervisorctl_help() {
|
||||
_arguments -s \
|
||||
"*:supervisorctl commands:_supervisorctl"
|
||||
}
|
||||
|
||||
(( $+functions[_supervisorctl_maintail] )) ||
|
||||
_supervisorctl_maintail() {
|
||||
_arguments -s \
|
||||
'-f[Continuous tail of supervisor main log file (Ctrl-C to exit)]'
|
||||
}
|
||||
|
||||
(( $+functions[_supervisorctl_start] )) ||
|
||||
_supervisorctl_start() {
|
||||
# TODO: add 'all'
|
||||
_arguments -s \
|
||||
'*::supvervisor process:_get_supervisor_procs'
|
||||
}
|
||||
|
||||
(( $+functions[_supervisorctl_status] )) ||
|
||||
_supervisorctl_status() {
|
||||
_arguments \
|
||||
'*::supvervisor process:_get_supervisor_procs'
|
||||
}
|
||||
|
||||
(( $+functions[_supervisorctl_stop] )) ||
|
||||
_supervisorctl_stop() {
|
||||
# TODO: add 'all'
|
||||
_arguments -s \
|
||||
'*::supvervisor process:_get_supervisor_procs'
|
||||
}
|
||||
|
||||
(( $+functions[_supervisorctl_tail] )) ||
|
||||
_supervisorctl_tail() {
|
||||
# TODO: add 'stderr'
|
||||
_arguments -s \
|
||||
'-f[Continuous tail of named process stdout Ctrl-C to exit.]' \
|
||||
'*::supvervisor process:_get_supervisor_procs'
|
||||
}
|
||||
|
||||
_supervisorctl "$@"
|
||||
32
plugins/supervisor/_supervisord
Normal file
32
plugins/supervisor/_supervisord
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
#compdef supervisord
|
||||
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
|
||||
_arguments \
|
||||
{--configuration,-c}"[configuration file]:FILENAME:_files" \
|
||||
{--nodaemon,-n}"[run in the foreground (same as 'nodaemon true' in config file)]" \
|
||||
{--help,-h}"[print this usage message and exit]:" \
|
||||
{--user,-u}"[run supervisord as this user]:USER:_users" \
|
||||
{--umask,-m}"[use this umask for daemon subprocess (default is 022)]" \
|
||||
{--directory,-d}"[directory to chdir to when daemonized]" \
|
||||
{--logfile,-l}"[use FILENAME as logfile path]:FILENAME:_files" \
|
||||
{--logfile_maxbytes,-y}"[use BYTES to limit the max size of logfile]" \
|
||||
{--logfile_backups,-z}"[number of backups to keep when max bytes reached]" \
|
||||
{--loglevel,-e}"[use LEVEL as log level (debug,info,warn,error,critical)]:level:->levels" \
|
||||
{--pidfile,-j}"[write a pid file for the daemon process to FILENAME]:FILENAME:_files" \
|
||||
{--identifier,-i}"[identifier used for this instance of supervisord]" \
|
||||
{--childlogdir,-q}"[the log directory for child process logs]:child log directory:_files -/" \
|
||||
{--nocleanup,-k}"[prevent the process from performing cleanup (removal of old automatic child log files) at startup.]" \
|
||||
{--minfds,-a}"[the minimum number of file descriptors for start success]" \
|
||||
{--strip_ansi,-t}"[strip ansi escape codes from process output]" \
|
||||
"--minprocs[the minimum number of processes available for start success]" \
|
||||
"--profile_options[run supervisord under profiler and output results based on OPTIONS, which is a comma-sep'd list of 'cumulative', 'calls', and/or 'callers', e.g. 'cumulative,callers')]" \
|
||||
"*::args:_gnu_generic"
|
||||
|
||||
case $state in
|
||||
levels)
|
||||
levels=("debug" "info" "warn" "error" "critical")
|
||||
_describe -t levels 'supervisord levels' levels && return 0
|
||||
;;
|
||||
esac
|
||||
1
plugins/supervisor/supervisor.plugin.zsh
Normal file
1
plugins/supervisor/supervisor.plugin.zsh
Normal file
|
|
@ -0,0 +1 @@
|
|||
# DECLARION: This plugin was created by hhatto. What I did is just making a portal from https://bitbucket.org/hhatto/zshcompfunc4supervisor.
|
||||
7
plugins/suse/suse.plugin.zsh
Normal file
7
plugins/suse/suse.plugin.zsh
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
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'
|
||||
alias zp='sudo zypper patch'
|
||||
alias zps='sudo zypper ps'
|
||||
|
|
@ -10,4 +10,8 @@ _symfony2 () {
|
|||
fi
|
||||
}
|
||||
|
||||
compdef _symfony2 app/console
|
||||
compdef _symfony2 app/console
|
||||
|
||||
#Alias
|
||||
alias sf2='php app/console'
|
||||
alias sf2clear='php app/console cache:clear'
|
||||
9
plugins/urltools/urltools.plugin.zsh
Normal file
9
plugins/urltools/urltools.plugin.zsh
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
# URL Tools
|
||||
# Adds handy command line aliases useful for dealing with URLs
|
||||
#
|
||||
# Taken from:
|
||||
# http://ruslanspivak.com/2010/06/02/urlencode-and-urldecode-from-a-command-line/
|
||||
|
||||
alias urlencode='python -c "import sys, urllib as ul; print ul.quote_plus(sys.argv[1])"'
|
||||
|
||||
alias urldecode='python -c "import sys, urllib as ul; print ul.unquote_plus(sys.argv[1])"'
|
||||
|
|
@ -5,7 +5,12 @@ function zle-line-init zle-keymap-select {
|
|||
zle -N zle-line-init
|
||||
zle -N zle-keymap-select
|
||||
|
||||
#changing mode clobbers the keybinds, so store the keybinds before and execute
|
||||
#them after
|
||||
binds=`bindkey -L`
|
||||
bindkey -v
|
||||
for bind in ${(@f)binds}; do eval $bind; done
|
||||
unset binds
|
||||
|
||||
# if mode indicator wasn't setup by theme, define default
|
||||
if [[ "$MODE_INDICATOR" == "" ]]; then
|
||||
|
|
|
|||
46
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
Normal file
46
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
WRAPPER_FOUND=0
|
||||
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
|
||||
|
||||
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
|
||||
PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null`
|
||||
if (( $? == 0 )); then
|
||||
# Check for virtualenv name override
|
||||
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
|
||||
unset PROJECT_ROOT
|
||||
}
|
||||
|
||||
# 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
|
||||
|
|
@ -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
|
||||
41
plugins/zeus/README.md
Normal file
41
plugins/zeus/README.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
## zeus
|
||||
**Maintainer:** [b4mboo](https://github.com/b4mboo)
|
||||
|
||||
* `zi` aliases `zeus init`
|
||||
* `zinit` aliases `zeus init`
|
||||
|
||||
* `zs` aliases `zeus start`
|
||||
* `ztart` aliases `zeus start`
|
||||
|
||||
* `zc` aliases `zeus console`
|
||||
* `zonsole` aliases `zeus console`
|
||||
|
||||
* `zsr` aliases `zeus server`
|
||||
* `zerver` aliases `zeus server`
|
||||
|
||||
* `zr` aliases `zeus rake`
|
||||
* `zake` aliases `zeus rake`
|
||||
|
||||
* `zg` aliases `zeus generate`
|
||||
* `zenerate` aliases `zeus generate`
|
||||
|
||||
* `zrn` aliases `zeus runner`
|
||||
* `zunner` aliases `zeus runner`
|
||||
|
||||
* `zcu` aliases `zeus cucumber`
|
||||
* `zucumber` aliases `zeus cucumber`
|
||||
|
||||
* `zt` aliases `zeus test`
|
||||
* `zest` aliases `zeus test`
|
||||
|
||||
* `zu` aliases `zeus test test/unit/*`
|
||||
* `zunits` aliases `zeus test test/unit/*`
|
||||
|
||||
* `zf` aliases `zeus test test/functional/*`
|
||||
* `zunctional` aliases `zeus test test/functional/*`
|
||||
|
||||
* `za` aliases `zeus test test/unit/*; zeus test test/functional/; zeus cucumber`
|
||||
* `zall` aliases `zeus test test/unit/*; zeus test test/functional/; zeus cucumber`
|
||||
|
||||
* `zsw` aliases `rm .zeus.sock`
|
||||
* `zweep` aliases `rm .zeus.sock`
|
||||
58
plugins/zeus/zeus.plugin.zsh
Normal file
58
plugins/zeus/zeus.plugin.zsh
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
# Some aliases for zeus. (See: https://github.com/burke/zeus)
|
||||
# Zeus preloads your Rails environment and forks that process whenever
|
||||
# needed. This effectively speeds up Rails' boot process to under 1 sec.
|
||||
|
||||
# Always use bundler.
|
||||
# Rails depends on bundler, so we can be pretty sure, that there are no
|
||||
# problems with this command. For all the other aliases I provided an
|
||||
# alternative, in case people have conflicts with other plugins (e.g. suse).
|
||||
alias zeus='bundle exec zeus'
|
||||
|
||||
# Init
|
||||
alias zi='zeus init'
|
||||
alias zinit='zeus init'
|
||||
|
||||
# Start
|
||||
alias zs='zeus start'
|
||||
alias ztart='zeus start'
|
||||
|
||||
# Console
|
||||
alias zc='zeus console'
|
||||
alias zonsole='zeus console'
|
||||
|
||||
# Server
|
||||
alias zsr='zeus server'
|
||||
alias zerver='zeus server'
|
||||
|
||||
# Rake
|
||||
alias zr='zeus rake'
|
||||
alias zake='zeus rake'
|
||||
|
||||
# Generate
|
||||
alias zg='zeus generate'
|
||||
alias zenerate='zeus generate'
|
||||
|
||||
# Runner
|
||||
alias zrn='zeus runner'
|
||||
alias zunner='zeus runner'
|
||||
|
||||
# Cucumber
|
||||
alias zcu='zeus cucumber'
|
||||
alias zucumber='zeus cucumber'
|
||||
|
||||
# Test
|
||||
alias zt='zeus test'
|
||||
alias zest='zeus test'
|
||||
|
||||
alias zu='zeus test test/unit/*'
|
||||
alias zunits='zeus test test/unit/*'
|
||||
|
||||
alias zf='zeus test test/functional/*'
|
||||
alias zunctional='zeus test test/functional/*'
|
||||
|
||||
alias za='zeus test test/unit/*; zeus test test/functional/; zeus cucumber'
|
||||
alias zall='zeus test test/unit/*; zeus test test/functional/; zeus cucumber'
|
||||
|
||||
# Clean up crashed zeus instances.
|
||||
alias zsw='rm .zeus.sock'
|
||||
alias zweep='rm .zeus.sock'
|
||||
Loading…
Add table
Add a link
Reference in a new issue