mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
Merge b3673100ff into 3913106b2e
This commit is contained in:
commit
a4925124bf
22 changed files with 52 additions and 46 deletions
|
|
@ -10,22 +10,22 @@ h2. Setup
|
|||
|
||||
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@
|
||||
|
||||
h4. via `wget`
|
||||
h4. via @wget@
|
||||
|
||||
@wget --no-check-certificate http://install.ohmyz.sh -O - | sh@
|
||||
|
||||
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
|
||||
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:
|
||||
|
||||
@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
|
|||
|
||||
@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@
|
||||
|
||||
|
|
@ -53,9 +53,9 @@ h3. The manual way
|
|||
|
||||
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
|
||||
|
||||
|
|
@ -72,16 +72,16 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo
|
|||
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 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
|
||||
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
|
||||
To disable updates entirely, put this in your @~/.zshrc@
|
||||
|
||||
@DISABLE_AUTO_UPDATE=true@
|
||||
|
||||
|
|
|
|||
|
|
@ -1,13 +1,13 @@
|
|||
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
|
||||
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
|
||||
fi
|
||||
|
|
|
|||
0
plugins/bower/_bower
Executable file → Normal file
0
plugins/bower/_bower
Executable file → Normal file
|
|
@ -3,6 +3,7 @@ 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
|
||||
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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'
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -158,3 +158,6 @@ __go_tool_complete() {
|
|||
}
|
||||
|
||||
compdef __go_tool_complete go
|
||||
|
||||
# aliases
|
||||
alias gfa='go fmt . ./...'
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
0
plugins/grails/grails.plugin.zsh
Executable file → Normal file
0
plugins/grails/grails.plugin.zsh
Executable file → Normal file
0
plugins/jruby/jruby.plugin.zsh
Executable file → Normal file
0
plugins/jruby/jruby.plugin.zsh
Executable file → Normal file
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
0
plugins/sublime/sublime.plugin.zsh
Executable file → Normal file
0
plugins/sublime/sublime.plugin.zsh
Executable file → Normal file
0
plugins/wd/wd.plugin.zsh
Executable file → Normal file
0
plugins/wd/wd.plugin.zsh
Executable file → Normal file
|
|
@ -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."
|
||||
|
|
|
|||
|
|
@ -7,10 +7,6 @@ export ZSH=$HOME/.oh-my-zsh
|
|||
# time that oh-my-zsh is loaded.
|
||||
ZSH_THEME="robbyrussell"
|
||||
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
|
||||
# Uncomment the following line to use case-sensitive completion.
|
||||
# CASE_SENSITIVE="true"
|
||||
|
||||
|
|
@ -26,8 +22,8 @@ ZSH_THEME="robbyrussell"
|
|||
# Uncomment the following line to disable auto-setting terminal title.
|
||||
# DISABLE_AUTO_TITLE="true"
|
||||
|
||||
# Uncomment the following line to disable command auto-correction.
|
||||
# DISABLE_CORRECTION="true"
|
||||
# Uncomment the following line to enable command auto-correction.
|
||||
# ENABLE_CORRECTION="true"
|
||||
|
||||
# Uncomment the following line to display red dots whilst waiting for completion.
|
||||
# COMPLETION_WAITING_DOTS="true"
|
||||
|
|
@ -72,3 +68,12 @@ export PATH=$HOME/bin:/usr/local/bin:$PATH
|
|||
|
||||
# ssh
|
||||
# export SSH_KEY_PATH="~/.ssh/dsa_id"
|
||||
|
||||
# Set personal aliases, overriding those provided by oh-my-zsh libs,
|
||||
# plugins, and themes. Aliases can be placed here, though oh-my-zsh
|
||||
# users are encouraged to define aliases within the ZSH_CUSTOM folder.
|
||||
# For a full list of active aliases, run `alias`.
|
||||
#
|
||||
# Example aliases
|
||||
# alias zshconfig="mate ~/.zshrc"
|
||||
# alias ohmyzsh="mate ~/.oh-my-zsh"
|
||||
|
|
|
|||
|
|
@ -81,7 +81,7 @@ add-zsh-hook chpwd steeef_chpwd
|
|||
function steeef_precmd {
|
||||
if [[ -n "$PR_GIT_UPDATE" ]] ; then
|
||||
# check for untracked files or updated submodules, since vcs_info doesn't
|
||||
if git ls-files --other --exclude-standard --directory 2> /dev/null | grep -q "."; then
|
||||
if git ls-files --other --exclude-standard 2> /dev/null | grep -q "."; then
|
||||
PR_GIT_UPDATE=1
|
||||
FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
|
||||
else
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ function _current_epoch() {
|
|||
}
|
||||
|
||||
function _update_zsh_update() {
|
||||
echo "LAST_EPOCH=$(_current_epoch)" > ~/.zsh-update
|
||||
echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update
|
||||
}
|
||||
|
||||
function _upgrade_zsh() {
|
||||
|
|
@ -20,8 +20,6 @@ if [[ -z "$epoch_target" ]]; then
|
|||
epoch_target=13
|
||||
fi
|
||||
|
||||
[ -f ~/.profile ] && source ~/.profile
|
||||
|
||||
if [ -f ~/.zsh-update ]
|
||||
then
|
||||
. ~/.zsh-update
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue