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
Oh My Zsh
Commits
d340bfab
Commit
d340bfab
authored
Oct 01, 2010
by
Daniel Schauenberg
Browse files
Merge remote branch 'origin/master' into restructure_plugins
parents
cef6dcd9
26d97a93
Changes
18
Hide whitespace changes
Inline
Side-by-side
lib/completion.zsh
View file @
d340bfab
#
# fixme - the load process here seems a bit bizarre
# fixme - the load process here seems a bit bizarre
unsetopt menu_complete
# do not autoselect the first completion entry
unsetopt menu_complete
# do not autoselect the first completion entry
unsetopt flowcontrol
unsetopt flowcontrol
...
@@ -30,6 +30,11 @@ zstyle ':completion:*:*:*:*:*' menu select
...
@@ -30,6 +30,11 @@ zstyle ':completion:*:*:*:*:*' menu select
zstyle
':completion:*:*:kill:*:processes'
list-colors
'=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01'
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"
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
=(
.
)
# Load known hosts file for auto-completion with ssh and scp commands
# Load known hosts file for auto-completion with ssh and scp commands
if
[
-f
~/.ssh/known_hosts
]
;
then
if
[
-f
~/.ssh/known_hosts
]
;
then
zstyle
':completion:*'
hosts
$(
sed
's/[, ].*$//'
$HOME
/.ssh/known_hosts
)
zstyle
':completion:*'
hosts
$(
sed
's/[, ].*$//'
$HOME
/.ssh/known_hosts
)
...
...
lib/functions.zsh
View file @
d340bfab
...
@@ -5,7 +5,7 @@ function title {
...
@@ -5,7 +5,7 @@ function title {
print
-nR
$'
\0
33k'
$1
$'
\0
33'
\\\
print
-nR
$'
\0
33k'
$1
$'
\0
33'
\\\
print
-nR
$'
\0
33]0;'
$2
$'
\a
'
print
-nR
$'
\0
33]0;'
$2
$'
\a
'
elif
[[
$TERM
=
=
"xterm"
||
$TERM
==
"rxvt"
]]
;
then
elif
[[
$TERM
=
~
"
^
xterm"
||
$TERM
==
"rxvt"
]]
;
then
# Use this one instead for XTerms:
# Use this one instead for XTerms:
print
-nR
$'
\0
33]0;'
$*
$'
\a
'
print
-nR
$'
\0
33]0;'
$*
$'
\a
'
fi
fi
...
...
lib/key-bindings.zsh
View file @
d340bfab
...
@@ -20,6 +20,7 @@ bindkey "^[[F" end-of-line
...
@@ -20,6 +20,7 @@ bindkey "^[[F" end-of-line
bindkey
"^[[4~"
end-of-line
bindkey
"^[[4~"
end-of-line
bindkey
' '
magic-space
# also do history expansion on space
bindkey
' '
magic-space
# also do history expansion on space
bindkey
'^[[Z'
reverse-menu-complete
# consider emacs keybindings:
# consider emacs keybindings:
...
...
oh-my-zsh.sh
View file @
d340bfab
...
@@ -12,7 +12,7 @@ for config_file ($ZSH/custom/*.zsh) source $config_file
...
@@ -12,7 +12,7 @@ for config_file ($ZSH/custom/*.zsh) source $config_file
# Load all of the plugins that were defined in ~/.zshrc
# Load all of the plugins that were defined in ~/.zshrc
plugin
=
${
plugin
:
=()
}
plugin
=
${
plugin
:
=()
}
for
plugin
(
$plugins
)
source
$ZSH
/plugins/
$plugin
.plugin.zsh
for
plugin
(
$plugins
)
source
$ZSH
/plugins/
$plugin
/
$plugin
.plugin.zsh
# Check for updates on initial load...
# Check for updates on initial load...
if
[
"
$DISABLE_AUTO_UPDATE
"
=
"true"
]
if
[
"
$DISABLE_AUTO_UPDATE
"
=
"true"
]
...
@@ -21,5 +21,3 @@ then
...
@@ -21,5 +21,3 @@ then
else
else
/usr/bin/env zsh
$ZSH
/tools/check_for_upgrade.sh
/usr/bin/env zsh
$ZSH
/tools/check_for_upgrade.sh
fi
fi
unset
config_file
\ No newline at end of file
plugins/brew.plugin.zsh
→
plugins/brew
/brew
.plugin.zsh
View file @
d340bfab
File moved
plugins/dirpersist/dirpersist.plugin.zsh
0 → 100644
View file @
d340bfab
#!/bin/zsh
#
# Make the dirstack more persistant
#
# Add dirpersist to $plugins in ~/.zshrc to load
#
# $zdirstore is the file used to persist the stack
zdirstore
=
~/.zdirstore
dirpersistinstall
()
{
if
grep
'dirpersiststore'
~/.zlogout
>
/dev/null
;
then
else
if
read
-q
\?
"Would you like to set up your .zlogout file for use with dirspersist? (y/n) "
;
then
echo
"# Store dirs stack
\n
# See ~/.oh-my-zsh/plugins/dirspersist.plugin.zsh
\n
dirpersiststore"
>>
~/.zlogout
else
echo
"If you don't want this message to appear, remove dirspersist from
\$
plugins"
fi
fi
}
dirpersiststore
()
{
dirs
-p
| perl
-e
'foreach (reverse <STDIN>) {chomp;s/([& ])/\\$1/g ;print "if [ -d $_ ]; then pushd -q $_; fi\n"}'
>
$zdirstore
}
dirpersistrestore
()
{
if
[
-f
$zdirstore
]
;
then
source
$zdirstore
fi
}
DIRSTACKSIZE
=
10
setopt autopushd pushdminus pushdsilent pushdtohome pushdignoredups
dirpersistinstall
dirpersistrestore
# Make popd changes permanent without having to wait for logout
alias popd
=
"popd;dirpersiststore"
plugins/git.plugin.zsh
→
plugins/git
/git
.plugin.zsh
View file @
d340bfab
File moved
plugins/lighthouse.plugin.zsh
→
plugins/lighthouse
/lighthouse
.plugin.zsh
View file @
d340bfab
File moved
plugins/macports/macports.plugin.zsh
0 → 100644
View file @
d340bfab
#Aliases
alias
pc
=
"sudo port clean --all installed"
alias
pi
=
"sudo port install
$1
"
alias
psu
=
"sudo port selfupdate"
alias
puni
=
"sudo port uninstall inactive"
alias
puo
=
"sudo port upgrade outdated"
alias
pup
=
"psu && puo"
plugins/mysql-macports.plugin.zsh
→
plugins/mysql
/mysql
-macports.plugin.zsh
View file @
d340bfab
File moved
plugins/osx.plugin.zsh
→
plugins/osx
/osx
.plugin.zsh
View file @
d340bfab
File moved
plugins/rails.plugin.zsh
→
plugins/rails
/rails
.plugin.zsh
View file @
d340bfab
File moved
plugins/ruby.plugin.zsh
→
plugins/ruby
/ruby
.plugin.zsh
View file @
d340bfab
File moved
plugins/ssh-agent/ssh-agent.plugin.zsh
0 → 100644
View file @
d340bfab
# Based on code from Joseph M. Reagle
# http://www.cygwin.com/ml/cygwin/2001-06/msg00537.html
local
SSH_ENV
=
$HOME
/.ssh/environment
function
start_agent
{
/usr/bin/env ssh-agent |
sed
's/^echo/#echo/'
>
${
SSH_ENV
}
chmod
600
${
SSH_ENV
}
.
${
SSH_ENV
}
>
/dev/null
/usr/bin/ssh-add
;
}
# Source SSH settings, if applicable
if
[
-f
"
${
SSH_ENV
}
"
]
;
then
.
${
SSH_ENV
}
>
/dev/null
ps
-ef
|
grep
${
SSH_AGENT_PID
}
|
grep
ssh-agent
$
>
/dev/null
||
{
start_agent
;
}
else
start_agent
;
fi
plugins/textmate.plugin.zsh
→
plugins/textmate
/textmate
.plugin.zsh
View file @
d340bfab
File moved
plugins/vi-mode/vi-mode.plugin.zsh
0 → 100644
View file @
d340bfab
function
zle-line-init zle-keymap-select
{
zle reset-prompt
}
zle
-N
zle-line-init
zle
-N
zle-keymap-select
bindkey
-v
# if mode indicator wasn't setup by theme, define default
if
[[
"
$MODE_INDICATOR
"
==
""
]]
;
then
MODE_INDICATOR
=
"%{
$fg_bold
[red]%}<%{
$fg
[red]%}<<%{
$reset_color
%}"
fi
function
vi_mode_prompt_info
()
{
echo
"
${${
KEYMAP
/vicmd/
$MODE_INDICATOR
}
/(main|viins)/
}
"
}
# define right prompt, if it wasn't defined by a theme
if
[[
"
$RPS1
"
==
""
&&
"
$RPROMPT
"
==
""
]]
;
then
RPS1
=
'$(vi_mode_prompt_info)'
fi
themes/kennethreitz.zsh-theme
0 → 100644
View file @
d340bfab
local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})"
PROMPT='%{$fg[green]%}%c \
$(git_prompt_info)\
%{$fg[red]%}%(!.#.»)%{$reset_color%} '
PROMPT2='%{$fg[red]%}\ %{$reset_color%}'
RPS1='%{$fg[blue]%}%~%{$reset_color%} ${return_code} '
ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}:: %{$fg[yellow]%}("
ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_CLEAN=""
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$fg[yellow]%}"
themes/theunraveler.zsh-theme
0 → 100644
View file @
d340bfab
# Comment
ZSH_THEME_GIT_PROMPT_PREFIX=' (git:'
ZSH_THEME_GIT_PROMPT_SUFFIX=')'
PROMPT='%{$fg[magenta]%}[%c]$(git_prompt_info) $ %{$reset_color%}'
\ No newline at end of file
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