Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Ohmyzsh
Commits
34f3d4d4
Commit
34f3d4d4
authored
Jun 28, 2012
by
Alexander Berezovsky
Browse files
Merge branch 'master' of
git://github.com/robbyrussell/oh-my-zsh
parents
4a2e9ed0
d165a84d
Changes
8
Show whitespace changes
Inline
Side-by-side
oh-my-zsh.sh
View file @
34f3d4d4
...
@@ -51,7 +51,7 @@ for plugin ($plugins); do
...
@@ -51,7 +51,7 @@ for plugin ($plugins); do
done
done
# Load all of your custom configurations from custom/
# 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
))
source
$config_file
# Load the theme
# Load the theme
if
[
"
$ZSH_THEME
"
=
"random"
]
if
[
"
$ZSH_THEME
"
=
"random"
]
...
...
plugins/jruby/jruby.plugin.zsh
0 → 100755
View file @
34f3d4d4
# Aliases
alias
jrspec
=
'jruby --debug -S rspec --debug'
alias
jprofile
=
'jruby --profile.api -S rspec'
alias
jexec
=
'jruby -S'
plugins/rbenv/rbenv.plugin.zsh
View file @
34f3d4d4
_homebrew-installed
()
{
type
brew &> /dev/null
}
_rbenv-from-homebrew-installed
()
{
brew
--prefix
rbenv &> /dev/null
}
FOUND_RBENV
=
0
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
if
[
-d
$rbenvdir
/bin
-a
$FOUND_RBENV
-eq
0
]
;
then
FOUND_RBENV
=
1
FOUND_RBENV
=
1
export
RBENV_ROOT
=
$rbenvdir
export
RBENV_ROOT
=
$rbenvdir
...
...
plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
View file @
34f3d4d4
...
@@ -10,11 +10,9 @@ for wrapsource in "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/
...
@@ -10,11 +10,9 @@ for wrapsource in "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/
# by placing a .venv file in the project root with a virtualenv name in it
# by placing a .venv file in the project root with a virtualenv name in it
function
workon_cwd
{
function
workon_cwd
{
# Check that this is a Git repo
# Check that this is a Git repo
GIT_DIR
=
`
git rev-parse
--
git-dir
2> /dev/null
`
PROJECT_ROOT
=
`
git rev-parse
--
show-toplevel
2> /dev/null
`
if
((
$?
==
0
))
;
then
if
((
$?
==
0
))
;
then
# Find the repo root and check for virtualenv name override
# Check for virtualenv name override
GIT_DIR
=
`
readlink
-f
$GIT_DIR
`
PROJECT_ROOT
=
`
dirname
"
$GIT_DIR
"
`
ENV_NAME
=
`
basename
"
$PROJECT_ROOT
"
`
ENV_NAME
=
`
basename
"
$PROJECT_ROOT
"
`
if
[[
-f
"
$PROJECT_ROOT
/.venv"
]]
;
then
if
[[
-f
"
$PROJECT_ROOT
/.venv"
]]
;
then
ENV_NAME
=
`
cat
"
$PROJECT_ROOT
/.venv"
`
ENV_NAME
=
`
cat
"
$PROJECT_ROOT
/.venv"
`
...
@@ -30,6 +28,7 @@ for wrapsource in "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/
...
@@ -30,6 +28,7 @@ for wrapsource in "/usr/local/bin/virtualenvwrapper.sh" "/etc/bash_completion.d/
# Note: this only happens if the virtualenv was activated automatically
# Note: this only happens if the virtualenv was activated automatically
deactivate
&&
unset
CD_VIRTUAL_ENV
deactivate
&&
unset
CD_VIRTUAL_ENV
fi
fi
unset
PROJECT_ROOT
}
}
# New cd function that does the virtualenv magic
# New cd function that does the virtualenv magic
...
...
plugins/yum/yum.plugin.zsh
View file @
34f3d4d4
...
@@ -5,7 +5,7 @@ alias yp="yum info" # show package info
...
@@ -5,7 +5,7 @@ alias yp="yum info" # show package info
alias
yl
=
"yum list"
# list packages
alias
yl
=
"yum list"
# list packages
alias
ygl
=
"yum grouplist"
# list package groups
alias
ygl
=
"yum grouplist"
# list package groups
alias
yli
=
"yum list installed"
# print all installed packages
alias
yli
=
"yum list installed"
# print all installed packages
alias
ymc
=
"yum makecache
# rebuilds the yum package list
alias
ymc
=
"yum makecache
"
# rebuilds the yum package list
alias
yu
=
"sudo yum update"
# upgrate packages
alias
yu
=
"sudo yum update"
# upgrate packages
alias
yi
=
"sudo yum install"
# install package
alias
yi
=
"sudo yum install"
# install package
...
...
themes/nebirhos.zsh-theme
View file @
34f3d4d4
...
@@ -6,7 +6,7 @@ if [ -e ~/.rvm/bin/rvm-prompt ]; then
...
@@ -6,7 +6,7 @@ if [ -e ~/.rvm/bin/rvm-prompt ]; then
RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} "
RUBY_PROMPT_="%{$fg_bold[blue]%}rvm:(%{$fg[green]%}\$(~/.rvm/bin/rvm-prompt s i v g)%{$fg_bold[blue]%})%{$reset_color%} "
else
else
if which rbenv &> /dev/null; then
if which rbenv &> /dev/null; then
RUBY_PROMPT_="%{$fg_bold[blue]%}rv
m
:(%{$fg[green]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%})%{$reset_color%} "
RUBY_PROMPT_="%{$fg_bold[blue]%}r
ben
v:(%{$fg[green]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg_bold[blue]%})%{$reset_color%} "
fi
fi
fi
fi
...
...
themes/steeef.zsh-theme
View file @
34f3d4d4
...
@@ -81,7 +81,7 @@ add-zsh-hook chpwd steeef_chpwd
...
@@ -81,7 +81,7 @@ add-zsh-hook chpwd steeef_chpwd
function steeef_precmd {
function steeef_precmd {
if [[ -n "$PR_GIT_UPDATE" ]] ; then
if [[ -n "$PR_GIT_UPDATE" ]] ; then
# check for untracked files or updated submodules, since vcs_info doesn't
# check for untracked files or updated submodules, since vcs_info doesn't
if
[[ ! -z $(
git ls-files --other --exclude-standard
2> /dev/null) ]]
; then
if git ls-files --other --exclude-standard
--directory 2> /dev/null | grep -q "."
; then
PR_GIT_UPDATE=1
PR_GIT_UPDATE=1
FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
else
else
...
...
tools/install.sh
View file @
34f3d4d4
...
@@ -5,13 +5,10 @@ then
...
@@ -5,13 +5,10 @@ then
fi
fi
echo
"
\0
33[0;34mCloning Oh My Zsh...
\0
33[0m"
echo
"
\0
33[0;34mCloning Oh My Zsh...
\0
33[0m"
which git
>
/dev/null
hash
git
>
/dev/null
&&
/usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
||
{
if
[[
$?
-eq
0
]]
;
then
/usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
else
echo
"git not installed"
echo
"git not installed"
exit
exit
fi
}
echo
"
\0
33[0;34mLooking for an existing zsh config...
\0
33[0m"
echo
"
\0
33[0;34mLooking for an existing zsh config...
\0
33[0m"
if
[
-f
~/.zshrc
]
||
[
-h
~/.zshrc
]
if
[
-f
~/.zshrc
]
||
[
-h
~/.zshrc
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment