1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2024-12-22 12:48:01 +00:00

Merge remote branch 'upstream/master'

This commit is contained in:
James Cox 2009-09-23 01:23:28 +01:00
commit a9d5ca981f
13 changed files with 148 additions and 28 deletions

2
.gitignore vendored
View File

@ -1,3 +1,3 @@
locals.zsh
log/.zsh_history
projects.zsh

View File

@ -42,6 +42,9 @@ TODO: Update this..
** Take a look at the "current themes":http://wiki.github.com/robbyrussell/oh-my-zsh/themes that come bundled with Oh My Zsh.
* much much more..
h2. Useful
the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty for tips.
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).
@ -59,3 +62,7 @@ h3. Send us your theme!
I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory.
h3. Todo from imajes:
* need to make the title bar support git folder
*

View File

@ -10,6 +10,7 @@ alias .='pwd'
alias ...='cd ../..'
alias _='sudo'
alias ss='sudo su -'
#alias g='grep -in'
@ -26,7 +27,10 @@ alias gba='git branch -a'
alias history='fc -l 1'
alias ls='ls -F'
alias ll='ls -al'
alias ll='ls -alr'
alias l='ls'
alias ll='ls -l'
alias sl=ls # often screw this up
alias sgem='sudo gem'

View File

@ -1,6 +1,8 @@
## fixme - the load process here seems a bit bizarre
setopt noautomenu
setopt COMPLETE_IN_WORD
setopt ALWAYS_TO_END
setopt complete_in_word
setopt always_to_end
unsetopt flowcontrol
@ -18,8 +20,9 @@ zstyle ':completion:*' list-colors ''
zstyle ':completion:*' hosts $( sed 's/[, ].*$//' $HOME/.ssh/known_hosts )
unsetopt MENU_COMPLETE
setopt AUTO_MENU
#setopt AUTO_MENU
# should this be in keybindings?
bindkey -M menuselect '^o' accept-and-infer-next-history
zstyle ':completion:*:*:*:*:*' menu yes select
@ -28,3 +31,10 @@ zstyle ':completion:*:*:*:*:*' menu yes 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"
zstyle ':completion:*:*:(ssh|scp):*:*' hosts `sed 's/^\([^ ,]*\).*$/\1/' ~/.ssh/known_hosts`
#complete on history
# zstyle ':completion:*:history-words' stop yes
# zstyle ':completion:*:history-words' remove-all-dups yes
# zstyle ':completion:*:history-words' list false
# zstyle ':completion:*:history-words' menu yes

6
correction.zsh Normal file
View File

@ -0,0 +1,6 @@
setopt correct_all
alias man='nocorrect man'
alias mv='nocorrect mv'
alias mysql='nocorrect mysql'
alias mv='nocorrect mv'

40
directories.zsh Normal file
View File

@ -0,0 +1,40 @@
# Changing/making/removing directory
setopt auto_name_dirs
setopt auto_pushd
setopt pushd_ignore_dups
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 ../../../..
else
builtin cd "$@"
fi
}
alias md='mkdir -p'
alias rd=rmdir
alias d='dirs -v'

View File

@ -1,3 +1,4 @@
## fixme, i duplicated this in xterms - oops
function title {
if [[ $TERM == "screen" ]]; then
# Use these two for GNU Screen:

View File

@ -1,15 +1,12 @@
# History stuff.
setopt HIST_VERIFY
setopt INC_APPEND_HISTORY
setopt SHARE_HISTORY
setopt EXTENDED_HISTORY
setopt HIST_IGNORE_DUPS
## Command history configuration
#
HISTFILE=$ZSH/log/.zsh_history
HISTSIZE=2500
SAVEHIST=2500
HISTFILE=$HOME/.zsh_history
HISTSIZE=5000
SAVEHIST=5000
setopt hist_ignore_dups # ignore duplication command history list
setopt share_history # share command history data
setopt hist_verify
setopt inc_append_history
setopt extended_history
setopt hist_expire_dups_first

View File

@ -1,14 +1,41 @@
# TODO: Explain what some of this does..
autoload -U compinit
compinit
bindkey -e
bindkey '\ew' kill-region
bindkey -s '\el' "ls\n"
bindkey -s '\e.' "..\n"
bindkey '^r' history-incremental-search-backward
bindkey "^[[5~" up-line-or-history
bindkey "^[[6~" down-line-or-history
# make search up and down work, so partially type and hit up/down to find relevant stuff
bindkey '^[[A' up-line-or-search
bindkey '^[[B' down-line-or-search
bindkey "^[[H" beginning-of-line
bindkey "^[[1~" beginning-of-line
bindkey "^[[F" 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
# consider emacs keybindings:
#bindkey -e ## emacs key bindings
#
#bindkey '^[[A' up-line-or-search
#bindkey '^[[B' down-line-or-search
#bindkey '^[^[[C' emacs-forward-word
#bindkey '^[^[[D' emacs-backward-word
#
#bindkey -s '^X^Z' '%-^M'
#bindkey '^[e' expand-cmd-path
#bindkey '^[^I' reverse-menu-complete
#bindkey '^X^N' accept-and-infer-next-history
#bindkey '^W' kill-region
#bindkey '^I' complete-word
## Fix weird sequence that rxvt produces
#bindkey -s '^[[Z' '\t'
#

9
misc.zsh Normal file
View File

@ -0,0 +1,9 @@
## smart urls
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
## file rename magick
bindkey "^[m" copy-prev-shell-word
## jobs
setopt long_list_jobs

View File

@ -1,19 +1,12 @@
export PAGER=less
export LC_CTYPE=en_US.UTF-8
bindkey -e
# speed stuff.
# Directory stuff.
setopt AUTO_NAME_DIRS
# Speed stuff.
#setopt NO_BEEP
setopt AUTO_CD
setopt MULTIOS
setopt CDABLEVARS
bindkey -e
#setopt no_beep
setopt auto_cd
setopt multios
setopt cdablevarS
if [[ x$WINDOW != x ]]
then

5
themes/imajes.zsh-theme Normal file
View File

@ -0,0 +1,5 @@
# Found on the ZshWiki
# http://zshwiki.org/home/config/prompt
#
PROMPT="%{$fg[red]%}%%%{$reset_color%} "

21
xterms.zsh Normal file
View File

@ -0,0 +1,21 @@
case "$TERM" in
xterm*|rxvt*)
preexec () {
print -Pn "\e]0;%n@%m: $1\a" # xterm
}
precmd () {
print -Pn "\e]0;%n@%m: %~\a" # xterm
}
;;
screen*)
preexec () {
local CMD=${1[(wr)^(*=*|sudo|ssh|-*)]}
echo -ne "\ek$CMD\e\\"
print -Pn "\e]0;%n@%m: $1\a" # xterm
}
precmd () {
echo -ne "\ekzsh\e\\"
print -Pn "\e]0;%n@%m: %~\a" # xterm
}
;;
esac