mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-19 20:29:45 +01:00
Merge branch 'master' of github.com:robbyrussell/oh-my-zsh
This commit is contained in:
commit
13998bb2cc
6 changed files with 56 additions and 45 deletions
|
@ -11,7 +11,9 @@ fpath=($ZSH/functions $ZSH/completions $fpath)
|
|||
|
||||
# Load all of the config files in ~/oh-my-zsh that end in .zsh
|
||||
# TIP: Add files you don't want in git to .gitignore
|
||||
for config_file ($ZSH/lib/*.zsh) source $config_file
|
||||
for config_file ($ZSH/lib/*.zsh); do
|
||||
source $config_file
|
||||
done
|
||||
|
||||
# Set ZSH_CUSTOM to the path where your custom config files
|
||||
# and plugins exists, or else we will use the default custom/
|
||||
|
@ -51,7 +53,9 @@ for plugin ($plugins); do
|
|||
done
|
||||
|
||||
# Load all of your custom configurations from custom/
|
||||
for config_file ($ZSH_CUSTOM/*.zsh(N)) source $config_file
|
||||
for config_file ($ZSH_CUSTOM/*.zsh(N)); do
|
||||
source $config_file
|
||||
done
|
||||
|
||||
# Load the theme
|
||||
if [ "$ZSH_THEME" = "random" ]
|
||||
|
|
|
@ -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 $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
|
||||
. /opt/local/etc/profile.d/autojump.zsh
|
||||
elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew
|
||||
|
|
|
@ -4,7 +4,7 @@ alias rubies='rvm list rubies'
|
|||
alias gemsets='rvm gemset list'
|
||||
|
||||
local ruby18='ruby-1.8.7-p334'
|
||||
local ruby19='ruby-1.9.2-p180'
|
||||
local ruby19='ruby-1.9.3-p194'
|
||||
|
||||
function rb18 {
|
||||
if [ -z "$1" ]; then
|
||||
|
@ -44,3 +44,8 @@ function gems {
|
|||
-Ee "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
|
||||
-Ee "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
|
||||
}
|
||||
|
||||
function _rvm_completion {
|
||||
source $rvm_path"/scripts/zsh/Completion/_rvm"
|
||||
}
|
||||
compdef _rvm_completion rvm
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
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
|
||||
wrapsource=`which virtualenvwrapper.sh`
|
||||
|
||||
if [[ -f "$wrapsource" ]]; then
|
||||
source $wrapsource
|
||||
|
||||
if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
|
||||
|
@ -36,11 +35,6 @@ for wrapsource in "/usr/bin/virtualenvwrapper.sh" "/usr/local/bin/virtualenvwrap
|
|||
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\`."
|
||||
else
|
||||
print "zsh virtualenvwrapper plugin: Cannot find virtualenvwrapper.sh. Please install with \`pip install virtualenvwrapper\`."
|
||||
fi
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
# ZSH Theme emulating the Fish shell's default prompt.
|
||||
|
||||
_fishy_collapsed_wd() {
|
||||
echo $(pwd | perl -pe "s|^$HOME|~|g; s|/([^/])[^/]*(?=/)|/\$1|g")
|
||||
}
|
||||
|
||||
local user_color='green'; [ $UID -eq 0 ] && user_color='red'
|
||||
PROMPT='%n@%m %{$fg[$user_color]%}%~%{$reset_color%}%(!.#.>) '
|
||||
PROMPT='%n@%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) '
|
||||
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
|
||||
|
||||
local return_status="%{$fg_bold[red]%}%(?..%?)%{$reset_color%}"
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
functions rbenv_prompt_info >& /dev/null || rbenv_prompt_info(){}
|
||||
|
||||
function theme_precmd {
|
||||
local TERMWIDTH
|
||||
(( TERMWIDTH = ${COLUMNS} - 1 ))
|
||||
|
|
Loading…
Reference in a new issue