Commit 4131a59d authored by Robby Russell's avatar Robby Russell
Browse files

Merge pull request #2827 from ncanceill/easymerge

...you folks are amazing. :-)

"Easy-to-merge" 
parents 3913106b 08632bb1
...@@ -10,22 +10,22 @@ h2. Setup ...@@ -10,22 +10,22 @@ h2. Setup
h3. The automatic installer... (do you trust me?) h3. The automatic installer... (do you trust me?)
You can install this via the command line with either `curl` or `wget`. You can install this via the command line with either @curl@ or @wget@.
h4. via `curl` h4. via @curl@
@curl -L http://install.ohmyz.sh | sh@ @curl -L http://install.ohmyz.sh | sh@
h4. via `wget` h4. via @wget@
@wget --no-check-certificate http://install.ohmyz.sh -O - | sh@ @wget --no-check-certificate http://install.ohmyz.sh -O - | sh@
h4. Optional: change the install directory h4. Optional: change the install directory
The default location is `~/.oh-my-zsh` (hidden in your home directory). The default location is @~/.oh-my-zsh@ (hidden in your home directory).
You can change the install directory with the ZSH environment variable, either You can change the install directory with the ZSH environment variable, either
by running `export ZSH=/your/path` before installing, or setting it before the by running @export ZSH=/your/path@ before installing, or setting it before the
end of the install pipeline like this: end of the install pipeline like this:
@curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@ @curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@
...@@ -37,7 +37,7 @@ h3. The manual way ...@@ -37,7 +37,7 @@ h3. The manual way
@git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@ @git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@
2. *OPTIONAL* Backup your existing ~/.zshrc file 2. *OPTIONAL* Backup your existing @~/.zshrc@ file
@cp ~/.zshrc ~/.zshrc.orig@ @cp ~/.zshrc ~/.zshrc.orig@
...@@ -53,9 +53,9 @@ h3. The manual way ...@@ -53,9 +53,9 @@ h3. The manual way
h3. Problems? h3. Problems?
You _might_ need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to _Oh My Zsh_. You _might_ need to modify your @PATH@ in @~/.zshrc@ if you're not able to find some commands after switching to _Oh My Zsh_.
If you installed manually or changed the install location, check ZSH in ~/.zshrc If you installed manually or changed the install location, check ZSH in @~/.zshrc@
h2. Usage h2. Usage
...@@ -72,16 +72,16 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo ...@@ -72,16 +72,16 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo
h3. Customization h3. Customization
If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory. If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory.
If you have many functions which go well together you can put them as a *.plugin.zsh file in the @custom/plugins/@ directory and then enable this plugin. If you have many functions which go well together you can put them as a @*.plugin.zsh@ file in the @custom/plugins/@ directory and then enable this plugin.
If you would like to override the functionality of a plugin distributed with oh-my-zsh, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@. If you would like to override the functionality of a plugin distributed with oh-my-zsh, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@.
h3. Updates h3. Updates
By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your ~/.zshrc By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your @~/.zshrc@
@DISABLE_UPDATE_PROMPT=true@ @DISABLE_UPDATE_PROMPT=true@
To disable updates entirely, put this in your ~/.zshrc To disable updates entirely, put this in your @~/.zshrc@
@DISABLE_AUTO_UPDATE=true@ @DISABLE_AUTO_UPDATE=true@
......
...@@ -44,7 +44,7 @@ zstyle ':completion:*:*:*:users' ignored-patterns \ ...@@ -44,7 +44,7 @@ zstyle ':completion:*:*:*:users' ignored-patterns \
named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \ named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \
operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \ operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \
rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \ rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \
usbmux uucp vcsa wwwrun xfs usbmux uucp vcsa wwwrun xfs '_*'
# ... unless we really want to. # ... unless we really want to.
zstyle '*' single-ignored show zstyle '*' single-ignored show
......
alias man='nocorrect man'
alias mv='nocorrect mv'
alias mysql='nocorrect mysql'
alias mkdir='nocorrect mkdir'
alias gist='nocorrect gist'
alias heroku='nocorrect heroku'
alias ebuild='nocorrect ebuild'
alias hpodder='nocorrect hpodder'
alias sudo='nocorrect sudo'
if [[ "$ENABLE_CORRECTION" == "true" ]]; then if [[ "$ENABLE_CORRECTION" == "true" ]]; then
alias ebuild='nocorrect ebuild'
alias gist='nocorrect gist'
alias heroku='nocorrect heroku'
alias hpodder='nocorrect hpodder'
alias man='nocorrect man'
alias mkdir='nocorrect mkdir'
alias mv='nocorrect mv'
alias mysql='nocorrect mysql'
alias sudo='nocorrect sudo'
setopt correct_all setopt correct_all
fi fi
# get the name of the branch we are on # get the name of the branch we are on
function git_prompt_info() { function git_prompt_info() {
if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]]; then
ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
ref=$(command git rev-parse --short HEAD 2> /dev/null) || return ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
fi fi
} }
......
...@@ -46,7 +46,9 @@ else ...@@ -46,7 +46,9 @@ else
fi fi
# Save the location of the current completion dump file. # Save the location of the current completion dump file.
ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}" if [ -z "$ZSH_COMPDUMP" ]; then
ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
fi
# Load and run compinit # Load and run compinit
autoload -U compinit autoload -U compinit
......
if [ $commands[autojump] ]; then # check if autojump is installed 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 . /usr/share/autojump/autojump.zsh
elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
. /etc/profile.d/autojump.zsh . /etc/profile.d/autojump.zsh
...@@ -7,8 +9,6 @@ if [ $commands[autojump] ]; then # check if autojump is installed ...@@ -7,8 +9,6 @@ if [ $commands[autojump] ]; then # check if autojump is installed
. /etc/profile.d/autojump.sh . /etc/profile.d/autojump.sh
elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation
. /usr/local/share/autojump/autojump.zsh . /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 elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
. /opt/local/etc/profile.d/autojump.zsh . /opt/local/etc/profile.d/autojump.zsh
elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew
......
File mode changed from 100755 to 100644
...@@ -3,10 +3,11 @@ alias bl="bundle list" ...@@ -3,10 +3,11 @@ alias bl="bundle list"
alias bp="bundle package" alias bp="bundle package"
alias bo="bundle open" alias bo="bundle open"
alias bu="bundle update" alias bu="bundle update"
alias bi="bundle_install"
# The following is based on https://github.com/gma/bundler-exec # 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 # Remove $UNBUNDLED_COMMANDS from the bundled_commands list
for cmd in $UNBUNDLED_COMMANDS; do for cmd in $UNBUNDLED_COMMANDS; do
...@@ -15,7 +16,7 @@ done ...@@ -15,7 +16,7 @@ done
## Functions ## Functions
bi() { bundle_install() {
if _bundler-installed && _within-bundled-project; then if _bundler-installed && _within-bundled-project; then
local bundler_version=`bundle version | cut -d' ' -f3` local bundler_version=`bundle version | cut -d' ' -f3`
if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
...@@ -39,8 +40,8 @@ _bundler-installed() { ...@@ -39,8 +40,8 @@ _bundler-installed() {
} }
_within-bundled-project() { _within-bundled-project() {
local check_dir=$PWD local check_dir="$PWD"
while [ $check_dir != "/" ]; do while [ "$check_dir" != "/" ]; do
[ -f "$check_dir/Gemfile" ] && return [ -f "$check_dir/Gemfile" ] && return
check_dir="$(dirname $check_dir)" check_dir="$(dirname $check_dir)"
done done
......
...@@ -19,4 +19,4 @@ bindkey -a 'N' vi-join ...@@ -19,4 +19,4 @@ bindkey -a 'N' vi-join
bindkey -a 'j' vi-forward-word-end bindkey -a 'j' vi-forward-word-end
bindkey -a 'J' vi-forward-blank-word-end bindkey -a 'J' vi-forward-blank-word-end
lesskey $ZSH_CUSTOM/plugins/colemak/colemak-less lesskey $ZSH/plugins/colemak/colemak-less
# Plugin for highligthing file content # Plugin for highlighting file content
# Plugin highlights file content based on the filename extension. # Plugin highlights file content based on the filename extension.
# If no highlighting method supported for given extension then it tries # If no highlighting method supported for given extension then it tries
# guess it by looking for file content. # guess it by looking for file content.
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
alias colorize='colorize_via_pygmentize' alias colorize='colorize_via_pygmentize'
colorize_via_pygmentize() { colorize_via_pygmentize() {
if [ ! -x $(which pygmentize) ]; then if [ ! -x "$(which pygmentize)" ]; then
echo package \'pygmentize\' is not installed! echo "package \'pygmentize\' is not installed!"
exit -1 return -1
fi fi
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
...@@ -25,4 +25,4 @@ colorize_via_pygmentize() { ...@@ -25,4 +25,4 @@ colorize_via_pygmentize() {
pygmentize -g "$FNAME" pygmentize -g "$FNAME"
fi fi
done done
} }
\ No newline at end of file
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# #
# ls, the common ones I use a lot shortened for rapid fire usage # 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 l='ls -lFh' #size,show type,human readable
alias la='ls -lAFh' #long list,show almost all,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 alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
...@@ -39,7 +38,7 @@ alias -g NE="2> /dev/null" ...@@ -39,7 +38,7 @@ alias -g NE="2> /dev/null"
alias -g NUL="> /dev/null 2>&1" alias -g NUL="> /dev/null 2>&1"
alias -g P="2>&1| pygmentize -l pytb" 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 duf='du -sh *'
alias fd='find . -type d -name' alias fd='find . -type d -name'
alias ff='find . -type f -name' alias ff='find . -type f -name'
......
...@@ -46,3 +46,6 @@ alias cdu='composer dump-autoload' ...@@ -46,3 +46,6 @@ alias cdu='composer dump-autoload'
# install composer in the current directory # install composer in the current directory
alias cget='curl -s https://getcomposer.org/installer | php' alias cget='curl -s https://getcomposer.org/installer | php'
# Add Composer's global binaries to PATH
export PATH=$PATH:~/.composer/vendor/bin
...@@ -141,6 +141,7 @@ _managepy-sqlinitialdata(){} ...@@ -141,6 +141,7 @@ _managepy-sqlinitialdata(){}
_managepy-sqlreset(){} _managepy-sqlreset(){}
_managepy-sqlsequencereset(){} _managepy-sqlsequencereset(){}
_managepy-startapp(){} _managepy-startapp(){}
_managepy-startproject(){}
_managepy-syncdb() { _managepy-syncdb() {
_arguments -s : \ _arguments -s : \
...@@ -198,6 +199,7 @@ _managepy-commands() { ...@@ -198,6 +199,7 @@ _managepy-commands() {
'sqlreset:Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).' '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).' '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." "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." "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.' '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).' 'testserver:Runs a development server with data from the given fixture(s).'
......
...@@ -52,7 +52,7 @@ function extract() { ...@@ -52,7 +52,7 @@ function extract() {
(*.xz) unxz "$1" ;; (*.xz) unxz "$1" ;;
(*.lzma) unlzma "$1" ;; (*.lzma) unlzma "$1" ;;
(*.Z) uncompress "$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" ;; (*.rar) unrar x -ad "$1" ;;
(*.7z) 7za x "$1" ;; (*.7z) 7za x "$1" ;;
(*.deb) (*.deb)
......
#!/usr/bin/env python #!/usr/bin/env python2
# -*- coding: UTF-8 -*- # -*- coding: UTF-8 -*-
from subprocess import Popen, PIPE from subprocess import Popen, PIPE
import re import re
......
...@@ -40,7 +40,7 @@ fi ...@@ -40,7 +40,7 @@ fi
# #
# Use this when creating a new repo from scratch. # Use this when creating a new repo from scratch.
empty_gh() { # [NAME_OF_REPO] empty_gh() { # [NAME_OF_REPO]
repo = $1 repo=$1
ghuser=$( git config github.user ) ghuser=$( git config github.user )
mkdir "$repo" mkdir "$repo"
......
...@@ -158,3 +158,6 @@ __go_tool_complete() { ...@@ -158,3 +158,6 @@ __go_tool_complete() {
} }
compdef __go_tool_complete go compdef __go_tool_complete go
# aliases
alias gfa='go fmt . ./...'
...@@ -60,7 +60,7 @@ function in_gradle() { ...@@ -60,7 +60,7 @@ function in_gradle() {
############################################################################ ############################################################################
_gradle_does_task_list_need_generating () { _gradle_does_task_list_need_generating () {
[ ! -f .gradletasknamecache ] && return 0; [ ! -f .gradletasknamecache ] && return 0;
[ .gradletasknamecache -nt build.gradle ] && return 0; [ build.gradle -nt .gradletasknamecache ] && return 0;
return 1; return 1;
} }
......
File mode changed from 100755 to 100644
File mode changed from 100755 to 100644
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment