-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
333 changed files
with
17,793 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
locals.zsh | ||
log/.zsh_history | ||
projects.zsh | ||
custom/* | ||
!custom/example | ||
!custom/example.zsh | ||
*.swp | ||
!custom/example.zshcache | ||
cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License | ||
|
||
Copyright (c) 2009-2013 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors) | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
oh-my-zsh is an open source, community-driven framework for managing your ZSH configuration. It comes bundled with a ton of helpful functions, helpers, plugins, themes, and few things that make you shout... | ||
|
||
bq. "OH MY ZSHELL!" | ||
|
||
h2. Setup | ||
|
||
@oh-my-zsh@ should work with any recent release of "zsh":http://www.zsh.org/, the minimum recommended version is 4.3.9. | ||
|
||
h3. The automatic installer... (do you trust me?) | ||
|
||
You can install this via the command line with either `curl` or `wget`. | ||
|
||
h4. via `curl` | ||
|
||
@curl -L https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh | sh@ | ||
|
||
h4. via `wget` | ||
|
||
@wget --no-check-certificate https://github.com/robbyrussell/oh-my-zsh/raw/master/tools/install.sh -O - | sh@ | ||
|
||
h3. The manual way | ||
|
||
|
||
1. Clone the repository | ||
|
||
@git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@ | ||
|
||
2. *OPTIONAL* Backup your existing ~/.zshrc file | ||
|
||
@cp ~/.zshrc ~/.zshrc.orig@ | ||
|
||
3. Create a new zsh config by copying the zsh template we've provided. | ||
|
||
@cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc@ | ||
|
||
|
||
4. Set zsh as your default shell: | ||
|
||
@chsh -s /bin/zsh@ | ||
|
||
5. Start / restart zsh (open a new terminal is easy enough...) | ||
|
||
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_. | ||
|
||
h2. Usage | ||
|
||
* enable the plugins you want in your @~/.zshrc@ (take a look at @plugins/@ to see what's possible) | ||
** example: @plugins=(git osx ruby)@ | ||
* Theme support: Change the @ZSH_THEME@ environment variable in @~/.zshrc@. | ||
** Take a look at the "current themes":https://wiki.github.com/robbyrussell/oh-my-zsh/themes that come bundled with _Oh My Zsh_. | ||
* much much more... take a look at @lib/@ what _Oh My Zsh_ offers... | ||
|
||
h2. Useful | ||
|
||
the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty for tips. | ||
|
||
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 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/@. | ||
|
||
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 | ||
|
||
@DISABLE_UPDATE_PROMPT=true@ | ||
|
||
To disable updates entirely, put this in your ~/.zshrc | ||
|
||
@DISABLE_AUTO_UPDATE=true@ | ||
|
||
To upgrade directly from the command line, just run @upgrade_oh_my_zsh@ | ||
|
||
h3. Uninstalling | ||
|
||
If you want to uninstall it, just run @uninstall_oh_my_zsh@ from the command line and it'll remove itself and revert you to bash (or your previous zsh config). | ||
|
||
h2. Help out! | ||
|
||
I'm far from being a zsh-expert and suspect there are many ways to improve. If you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests! | ||
|
||
h3. (Don't) Send us your theme! (for now) | ||
|
||
-I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory.- | ||
|
||
We have enough themes for the time being. Please fork the project and add on in there, you can let people know how to grab it from there. | ||
|
||
h2. Contributors | ||
|
||
This project wouldn't exist without all of our awesome users and contributors. | ||
|
||
* "View our growing list of contributors":https://github.com/robbyrussell/oh-my-zsh/contributors | ||
|
||
Thank you so much! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Add yourself some shortcuts to projects you often work on | ||
# Example: | ||
# | ||
# brainstormr=/Users/robbyrussell/Projects/development/planetargon/brainstormr | ||
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
# Add your own custom plugins in the custom/plugins directory. Plugins placed | ||
# here will override ones with the same name in the main plugins directory. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Push and pop directories on directory stack | ||
alias pu='pushd' | ||
alias po='popd' | ||
|
||
# Basic directory operations | ||
alias ...='cd ../..' | ||
alias -- -='cd -' | ||
|
||
# Super user | ||
alias _='sudo' | ||
alias please='sudo' | ||
|
||
#alias g='grep -in' | ||
|
||
# Show history | ||
alias history='fc -l 1' | ||
|
||
# List direcory contents | ||
alias lsa='ls -lah' | ||
alias l='ls -la' | ||
alias ll='ls -l' | ||
alias la='ls -lA' | ||
alias sl=ls # often screw this up | ||
|
||
alias afind='ack-grep -il' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# fixme - the load process here seems a bit bizarre | ||
|
||
unsetopt menu_complete # do not autoselect the first completion entry | ||
unsetopt flowcontrol | ||
setopt auto_menu # show completion menu on succesive tab press | ||
setopt complete_in_word | ||
setopt always_to_end | ||
|
||
WORDCHARS='' | ||
|
||
zmodload -i zsh/complist | ||
|
||
## case-insensitive (all),partial-word and then substring completion | ||
if [ "x$CASE_SENSITIVE" = "xtrue" ]; then | ||
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' | ||
unset CASE_SENSITIVE | ||
else | ||
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' | ||
fi | ||
|
||
zstyle ':completion:*' list-colors '' | ||
|
||
# should this be in keybindings? | ||
bindkey -M menuselect '^o' accept-and-infer-next-history | ||
|
||
zstyle ':completion:*:*:*:*:*' menu select | ||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' | ||
zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" | ||
|
||
# disable named-directories autocompletion | ||
zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories | ||
cdpath=(.) | ||
|
||
# use /etc/hosts and known_hosts for hostname completion | ||
[ -r /etc/ssh/ssh_known_hosts ] && _global_ssh_hosts=(${${${${(f)"$(</etc/ssh/ssh_known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _global_ssh_hosts=() | ||
[ -r ~/.ssh/known_hosts ] && _ssh_hosts=(${${${${(f)"$(<$HOME/.ssh/known_hosts)"}:#[\|]*}%%\ *}%%,*}) || _ssh_hosts=() | ||
[ -r ~/.ssh/config ] && _ssh_config=($(cat ~/.ssh/config | sed -ne 's/Host[=\t ]//p')) || _ssh_config=() | ||
[ -r /etc/hosts ] && : ${(A)_etc_hosts:=${(s: :)${(ps:\t:)${${(f)~~"$(</etc/hosts)"}%%\#*}##[:blank:]#[^[:blank:]]#}}} || _etc_hosts=() | ||
hosts=( | ||
"$_ssh_config[@]" | ||
"$_global_ssh_hosts[@]" | ||
"$_ssh_hosts[@]" | ||
"$_etc_hosts[@]" | ||
"$HOST" | ||
localhost | ||
) | ||
zstyle ':completion:*:hosts' hosts $hosts | ||
zstyle ':completion:*' users off | ||
|
||
# Use caching so that commands like apt and dpkg complete are useable | ||
zstyle ':completion::complete:*' use-cache 1 | ||
zstyle ':completion::complete:*' cache-path $ZSH/cache/ | ||
|
||
# Don't complete uninteresting users | ||
zstyle ':completion:*:*:*:users' ignored-patterns \ | ||
adm amanda apache avahi beaglidx bin cacti canna clamav daemon \ | ||
dbus distcache dovecot fax ftp games gdm gkrellmd gopher \ | ||
hacluster haldaemon halt hsqldb ident junkbust ldap lp mail \ | ||
mailman mailnull mldonkey mysql nagios \ | ||
named netdump news nfsnobody nobody nscd ntp nut nx openvpn \ | ||
operator pcap postfix postgres privoxy pulse pvm quagga radvd \ | ||
rpc rpcuser rpm shutdown squid sshd sync uucp vcsa xfs | ||
|
||
# ... unless we really want to. | ||
zstyle '*' single-ignored show | ||
|
||
if [ "x$COMPLETION_WAITING_DOTS" = "xtrue" ]; then | ||
expand-or-complete-with-dots() { | ||
echo -n "\e[31m......\e[0m" | ||
zle expand-or-complete | ||
zle redisplay | ||
} | ||
zle -N expand-or-complete-with-dots | ||
bindkey "^I" expand-or-complete-with-dots | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
if [[ "$DISABLE_CORRECTION" == "true" ]]; then | ||
return | ||
else | ||
setopt correct_all | ||
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' | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Changing/making/removing directory | ||
setopt auto_name_dirs | ||
setopt auto_pushd | ||
setopt pushd_ignore_dups | ||
setopt pushdminus | ||
|
||
alias ..='cd ..' | ||
alias cd..='cd ..' | ||
alias cd...='cd ../..' | ||
alias cd....='cd ../../..' | ||
alias cd.....='cd ../../../..' | ||
alias cd/='cd /' | ||
|
||
alias 1='cd -' | ||
alias 2='cd -2' | ||
alias 3='cd -3' | ||
alias 4='cd -4' | ||
alias 5='cd -5' | ||
alias 6='cd -6' | ||
alias 7='cd -7' | ||
alias 8='cd -8' | ||
alias 9='cd -9' | ||
|
||
cd () { | ||
if [[ "x$*" == "x..." ]]; then | ||
cd ../.. | ||
elif [[ "x$*" == "x...." ]]; then | ||
cd ../../.. | ||
elif [[ "x$*" == "x....." ]]; then | ||
cd ../../../.. | ||
elif [[ "x$*" == "x......" ]]; then | ||
cd ../../../../.. | ||
elif [ -d ~/.autoenv ]; then | ||
source ~/.autoenv/activate.sh | ||
autoenv_cd "$@" | ||
else | ||
builtin cd "$@" | ||
fi | ||
} | ||
|
||
alias md='mkdir -p' | ||
alias rd=rmdir | ||
alias d='dirs -v | head -10' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
autoload -U edit-command-line | ||
zle -N edit-command-line | ||
bindkey '\C-x\C-e' edit-command-line |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
function zsh_stats() { | ||
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20 | ||
} | ||
|
||
function uninstall_oh_my_zsh() { | ||
/usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/uninstall.sh | ||
} | ||
|
||
function upgrade_oh_my_zsh() { | ||
/usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh | ||
} | ||
|
||
function take() { | ||
mkdir -p $1 | ||
cd $1 | ||
} | ||
|
Oops, something went wrong.