1
0
Fork 0

Rebranded as Prezto. Added personal prompt theme.

pull/246/head
Avery Yen 12 years ago
parent 2250f93fa3
commit b9d64eb21c

@ -1,4 +1,4 @@
Oh My Zsh
Prezto
=========
OMZ is a configuration framework for [Zsh][1] that enriches the command line
@ -8,17 +8,17 @@ and prompt themes.
Installation
------------
Oh My Zsh will work with any recent release of Zsh, but the minimum recommended
Prezto will work with any recent release of Zsh, but the minimum recommended
version is 4.3.10.
1. Clone the repository:
git clone --recursive https://github.com/sorin-ionescu/oh-my-zsh.git ~/.oh-my-zsh
git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.prezto
2. Create a new Zsh configuration by copying the Zsh configuration file
runcoms provided:
for rcfile in ~/.oh-my-zsh/runcoms/z{shenv,shrc,login,logout}; do
for rcfile in ~/.prezto/runcoms/z{shenv,shrc,login,logout}; do
cp -f $rcfile ~/.$rcfile:t
done
@ -49,14 +49,14 @@ directories end up at the tail of the array.
### Troubleshooting
If you are not able to find certain commands after switching to *Oh My Zsh*,
If you are not able to find certain commands after switching to *Prezto*,
modify the `PATH` variable in *~/.zshenv* then open a new Zsh terminal
window or tab.
Usage
-----
Oh My Zsh has many features disabled by default. Read the source code and
Prezto has many features disabled by default. Read the source code and
accompanying README files to learn of what is available.
### Modules
@ -83,7 +83,7 @@ how to use Git, follow this [tutorial][5] and bookmark this [reference][6].
### Completions
Submit program completions to the [zsh-completions][7] project. The Oh My Zsh
Submit program completions to the [zsh-completions][7] project. The Prezto
completions directory will be synchronized against it.
Resources
@ -161,7 +161,7 @@ SOFTWARE.
[6]: http://gitref.org
[7]: https://github.com/zsh-users/zsh-completions
[8]: http://www.bash2zsh.com/zsh_refcard/refcard.pdf
[9]: https://github.com/sorin-ionescu/oh-my-zsh/contributors
[9]: https://github.com/sorin-ionescu/prezto/contributors
[10]: http://gun.io/blog/how-to-github-fork-branch-and-pull-request
[11]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
[12]: https://help.github.com/articles/using-pull-requests

@ -30,7 +30,7 @@ function autoloadable {
( unfunction $1 ; autoload -U +X $1 ) &> /dev/null
}
# Loads Oh My Zsh modules.
# Loads Prezto modules.
function omodload {
local -a omodules
local omodule
@ -48,13 +48,13 @@ function omodload {
# Extended globbing is needed for listing autoloadable function directories.
setopt LOCAL_OPTIONS EXTENDED_GLOB
# Load Oh My Zsh functions.
# Load Prezto functions.
for ofunction in $OMZ/modules/${^omodules}/functions/$~ofunction_glob; do
autoload -Uz "$ofunction"
done
}
# Load Oh My Zsh modules.
# Load Prezto modules.
for omodule in "$omodules[@]"; do
if zstyle -t ":omz:module:$omodule" loaded; then
continue
@ -79,7 +79,7 @@ function omodload {
# directories.
setopt LOCAL_OPTIONS EXTENDED_GLOB
# Unload Oh My Zsh functions.
# Unload Prezto functions.
for ofunction in $OMZ/modules/$omodule/functions/$~ofunction_glob; do
unfunction "$ofunction"
done

@ -1,5 +1,5 @@
#
# Initializes Oh My Zsh.
# Initializes Prezto.
#
# Authors:
# Robby Russell <robby@planetargon.com>

@ -37,5 +37,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[1]: https://github.com/sorin-ionescu/prezto/issues

@ -11,5 +11,5 @@ Authors
- [Joseph Booker](https://github.com/sargas)
[1]: https://code.launchpad.net/command-not-found
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -20,5 +20,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/zsh-users/zsh-completions
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -32,5 +32,5 @@ Authors
- [James Cox](https://github.com/imajes)
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[1]: https://github.com/sorin-ionescu/prezto/issues

@ -38,5 +38,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: http://wiki.debian.org/Teams/Dpkg
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -22,5 +22,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[1]: https://github.com/sorin-ionescu/prezto/issues

@ -29,5 +29,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[1]: https://github.com/sorin-ionescu/prezto/issues

@ -12,5 +12,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: http://linux.die.net/man/1/gpg-agent
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -25,5 +25,5 @@ Authors
- [Sebastian Wiesner](https://github.com/lunaryorn)
[1]: http://www.haskell.org/cabal/
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -1,7 +1,7 @@
History Substring Search
========================
Integrates [zsh-history-substring-search][1] into Oh My Zsh, which implements
Integrates [zsh-history-substring-search][1] into Prezto, which implements
the [Fish shell][2]'s history search feature, where the user can type in any
part of a previously entered command and press up and down to cycle through
matching commands.
@ -45,5 +45,5 @@ Authors
[1]: https://github.com/zsh-users/zsh-history-substring-search
[2]: http://fishshell.com
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[3]: https://github.com/sorin-ionescu/prezto/issues

@ -1,5 +1,5 @@
#
# Integrates history-substring-search into Oh My Zsh.
# Integrates history-substring-search into Prezto.
#
# Authors:
# Suraj N. Kurapati <sunaku@gmail.com>

@ -40,5 +40,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: http://zsh.sourceforge.net/Guide/zshguide02.html#l16
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -22,5 +22,5 @@ Authors
- [Matt Cable](https://github.com/curiousstranger)
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[1]: https://github.com/sorin-ionescu/prezto/issues

@ -19,5 +19,5 @@ Authors
[1]: http://nodejs.org
[2]: http://npmjs.org
[3]: http://nodejs.org/api
[4]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[4]: https://github.com/sorin-ionescu/prezto/issues

@ -32,5 +32,5 @@ Authors
[1]: http://www.apple.com/macosx/
[2]: http://bruji.com/bwana/
[3]: http://www.iterm2.com/
[4]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[4]: https://github.com/sorin-ionescu/prezto/issues

@ -61,5 +61,5 @@ Authors
[1]: http://www.archlinux.org/pacman/
[2]: http://archlinux.fr/yaourt-en
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[3]: https://github.com/sorin-ionescu/prezto/issues

@ -65,5 +65,5 @@ Authors
[1]: http://www.perl.org
[2]: http://perlbrew.pl
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[3]: https://github.com/sorin-ionescu/prezto/issues

@ -20,5 +20,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Prompt-Themes
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -0,0 +1,101 @@
#
# A theme based on Steve Losh's Extravagant Prompt with vcs_info integration.
# Requires hg-prompt <http://stevelosh.com/projects/hg-prompt/>
#
# Authors:
# Steve Losh <steve@stevelosh.com>
# Bart Trojanowski <bart@jukie.net>
# Brian Carper <brian@carper.ca>
# steeef <steeef@gmail.com>
# Sorin Ionescu <sorin.ionescu@gmail.com>
# haplesshero13 <haplesshero13@gmail.com>
#
# Left prompt is modified version of the Bash prompt by AntiGenX
# <http://hintsforums.macworld.com/showthread.php?t=17068>
#
# Screenshots:
# TBA
#
function prompt_char {
git branch >/dev/null 2>/dev/null && echo 'λ' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
echo '$'
}
function hg_prompt_info {
hg prompt "(${_prompt_steeef_colors[1]}{branch}%f${_prompt_steeef_colors[2]}{status|modified|unknown}%f{update})" 2>/dev/null
}
function rvm_info {
if which rvm-prompt &> /dev/null; then
echo "${_prompt_steeef_colors[5]}$(rvm-prompt i v g)"
else
if which rbenv &> /dev/null; then
echo "${_prompt_steeef_colors[5]}$(rbenv version | sed -e "s/ (set.*$//")"
fi
fi
}
function prompt_steeef_precmd {
# Check for untracked files or updated submodules since vcs_info does not.
if [[ -n $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then
branch_format="(${_prompt_steeef_colors[1]}%b%f%u%c${_prompt_steeef_colors[4]}●%f)"
else
branch_format="(${_prompt_steeef_colors[1]}%b%f%u%c)"
fi
zstyle ':vcs_info:*:prompt:*' formats "${branch_format}"
vcs_info 'prompt'
}
function prompt_steeef_setup {
setopt LOCAL_OPTIONS
unsetopt XTRACE KSH_ARRAYS
prompt_opts=(cr percent subst)
# Load required functions.
autoload -Uz add-zsh-hook
autoload -Uz vcs_info
# Add hook for calling vcs_info before each command.
add-zsh-hook precmd prompt_steeef_precmd
_prompt_steeef_colors=(
"%F{cyan}"
"%F{yellow}"
"%F{magenta}"
"%F{red}"
"%F{green}"
)
# Formats:
# %b - branchname
# %u - unstagedstr (see below)
# %c - stagedstr (see below)
# %a - action (e.g. rebase-i)
# %R - repository path
# %S - path in the repository
local branch_format="(${_prompt_steeef_colors[1]}%b%f%u%c)"
local action_format="(${_prompt_steeef_colors[5]}%a%f)"
local unstaged_format="${_prompt_steeef_colors[2]}●%f"
local staged_format="${_prompt_steeef_colors[5]}●%f"
local return_code='%(?..${_prompt_steeef_colors[4]}%? ↵%f)'
# Set vcs_info parameters.
zstyle ':vcs_info:*' enable git
zstyle ':vcs_info:*:prompt:*' check-for-changes true
zstyle ':vcs_info:*:prompt:*' unstagedstr "${unstaged_format}"
zstyle ':vcs_info:*:prompt:*' stagedstr "${staged_format}"
zstyle ':vcs_info:*:prompt:*' actionformats "${branch_format}${action_format}"
zstyle ':vcs_info:*:prompt:*' formats "${branch_format}"
zstyle ':vcs_info:*:prompt:*' nvcsformats ""
# Define prompts.
PROMPT="${_prompt_steeef_colors[3]}%n%f@${_prompt_steeef_colors[2]}%m%f:${_prompt_steeef_colors[1]}%~%f"'$(prompt_char) '
RPROMPT="${return_code} "'${vcs_info_msg_0_}$(hg_prompt_info)$(rvm_info)'
}
prompt_steeef_setup "$@"

@ -43,5 +43,5 @@ Authors
[2]: http://www.doughellmann.com/projects/virtualenvwrapper/
[3]: http://pypi.python.org/pypi/virtualenv
[4]: http://www.doughellmann.com/docs/virtualenvwrapper/#introduction
[5]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[5]: https://github.com/sorin-ionescu/prezto/issues

@ -30,5 +30,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: http://rubyonrails.org
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -24,5 +24,5 @@ Authors
[1]: http://rsync.samba.org
[2]: http://www.bombich.com/rsync.html
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[3]: https://github.com/sorin-ionescu/prezto/issues

@ -63,5 +63,5 @@ Authors
[2]: https://rvm.io
[3]: https://github.com/sstephenson/rbenv
[4]: http://gembundler.com
[5]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[5]: https://github.com/sorin-ionescu/prezto/issues

@ -29,5 +29,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: http://www.gnu.org/software/screen/
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -32,5 +32,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-agent&sektion=1
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -1,7 +1,7 @@
Syntax Highlighting
===================
Integrates [zsh-syntax-highlighting][1] into Oh My Zsh.
Integrates [zsh-syntax-highlighting][1] into Prezto.
This module should be loaded *second to last*, where last is the *prompt*
module, unless used in conjuncture with the *history-substring-search* module
@ -46,5 +46,5 @@ Authors
[1]: https://github.com/zsh-users/zsh-syntax-highlighting
[2]: https://github.com/zsh-users/zsh-syntax-highlighting/tree/master/highlighters
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[3]: https://github.com/sorin-ionescu/prezto/issues

@ -1,5 +1,5 @@
#
# Integrates zsh-syntax-highlighting into Oh My Zsh.
# Integrates zsh-syntax-highlighting into Prezto.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>

@ -21,5 +21,5 @@ Authors
- [James Cox](https://github.com/imajes)
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[1]: https://github.com/sorin-ionescu/prezto/issues

@ -52,5 +52,5 @@ Authors
[2]: http://git.io/jkPqHg
[3]: ChrisJohnsen/tmux-MacOSX-pasteboard
[4]: mxcl/homebrew
[5]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[5]: https://github.com/sorin-ionescu/prezto/issues

@ -17,5 +17,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[1]: https://github.com/sorin-ionescu/prezto/issues

@ -149,5 +149,5 @@ Authors
- [Suraj N. Kurapati](https://github.com/sunaku)
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[1]: https://github.com/sorin-ionescu/prezto/issues

@ -33,5 +33,5 @@ Authors
[1]: http://gsd.di.uminho.pt/jpo/software/wakeonlan/
[2]: http://man.cx/wakeonlan
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[3]: https://github.com/sorin-ionescu/prezto/issues

@ -25,5 +25,5 @@ Authors
- [Sorin Ionescu](https://github.com/sorin-ionescu)
[1]: http://yum.baseurl.org
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[2]: https://github.com/sorin-ionescu/prezto/issues

@ -19,5 +19,5 @@ Authors
[1]: https://github.com/rupa/z
[2]: https://github.com/joelthelion/autojump
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[3]: https://github.com/sorin-ionescu/prezto/issues

@ -45,7 +45,7 @@ zprofile and zlogin are not meant to be used concurrently but can be done so.
This file is sourced by interactive shells. It should define aliases,
functions, shell options, and key bindings.
This is the main Oh My Zsh configuration file.
This is the main Prezto configuration file.
### zlogin
@ -71,5 +71,5 @@ Authors
[1]: http://www.kornshell.com
[2]: http://en.wikipedia.org/wiki/Fortune_(Unix)
[3]: http://www.manpagez.com/man/1/msgs
[4]: https://github.com/sorin-ionescu/oh-my-zsh/issues
[4]: https://github.com/sorin-ionescu/prezto/issues

@ -5,8 +5,8 @@
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Set the path to Oh My Zsh.
export OMZ="$HOME/.oh-my-zsh"
# Set the path to Prezto.
export OMZ="$HOME/.prezto"
#
# Paths

@ -1,5 +1,5 @@
#
# Sets Oh My Zsh options.
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
@ -26,7 +26,7 @@ zstyle ':omz:module:terminal' auto-title 'yes'
# Set the Zsh functions to load (man zshcontrib).
# zstyle ':omz:load' zfunction 'zargs' 'zmv'
# Set the Oh My Zsh modules to load (browse modules).
# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':omz:load' omodule \
'environment' \
@ -44,7 +44,7 @@ zstyle ':omz:load' omodule \
# Auto set to 'off' on dumb terminals.
zstyle ':omz:module:prompt' theme 'sorin'
# This will make you shout: OH MY ZSHELL!
# This will make you shout: PREZTO!
source "$OMZ/init.zsh"
# Customize to your needs...

Loading…
Cancel
Save