parent
5232191cbe
commit
fb9a20591f
36
README.md
36
README.md
|
@ -1,32 +1,36 @@
|
||||||
Oh My Zsh
|
Prezto — Instantly Awesome Zsh
|
||||||
=========
|
==============================
|
||||||
|
|
||||||
OMZ is a configuration framework for [Zsh][1] that enriches the command line
|
Prezto is the configuration framework for [Zsh][1]; it enriches the command line
|
||||||
interface environment with sane defaults, aliases, functions, auto completion,
|
interface environment with sane defaults, aliases, functions, auto completion,
|
||||||
and prompt themes.
|
and prompt themes.
|
||||||
|
|
||||||
Installation
|
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.
|
version is 4.3.10.
|
||||||
|
|
||||||
1. Clone the repository:
|
1. Launch Zsh:
|
||||||
|
|
||||||
git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.oh-my-zsh
|
zsh
|
||||||
|
|
||||||
2. Create a new Zsh configuration by copying the Zsh configuration file
|
2. Clone the repository:
|
||||||
runcoms provided:
|
|
||||||
|
|
||||||
for rcfile in ~/.oh-my-zsh/runcoms/z{shenv,shrc,login,logout}; do
|
git clone --recursive https://github.com/sorin-ionescu/prezto.git "${ZDOTDIR:-$HOME}/.zprezto"
|
||||||
cp -f $rcfile ~/.$rcfile:t
|
|
||||||
|
3. Create a new Zsh configuration by copying the Zsh configuration files
|
||||||
|
provided:
|
||||||
|
|
||||||
|
for rcfile in "${ZDOTDIR:-$HOME}/.zprezto/runcoms/z"{shenv,shrc,login,logout}; do
|
||||||
|
cp -f "$rcfile" "$ZDOTDIR/.$rcfile:t"
|
||||||
done
|
done
|
||||||
|
|
||||||
3. Set Zsh as your default shell:
|
4. Set Zsh as your default shell:
|
||||||
|
|
||||||
chsh -s /bin/zsh
|
chsh -s /bin/zsh
|
||||||
|
|
||||||
4. Open a new Zsh terminal window or tab.
|
5. Open a new Zsh terminal window or tab.
|
||||||
|
|
||||||
### Mac OS X
|
### Mac OS X
|
||||||
|
|
||||||
|
@ -49,14 +53,14 @@ directories end up at the tail of the array.
|
||||||
|
|
||||||
### Troubleshooting
|
### 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
|
modify the `PATH` variable in *~/.zshenv* then open a new Zsh terminal
|
||||||
window or tab.
|
window or tab.
|
||||||
|
|
||||||
Usage
|
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.
|
accompanying README files to learn of what is available.
|
||||||
|
|
||||||
### Modules
|
### Modules
|
||||||
|
@ -149,14 +153,14 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
SOFTWARE.
|
SOFTWARE.
|
||||||
|
|
||||||
[1]: http://www.zsh.org
|
[1]: http://www.zsh.org
|
||||||
[2]: http://i.imgur.com/aipDQ.png "sorin theme"
|
[2]: http://i.imgur.com/4CeOj.png "sorin theme"
|
||||||
[3]: http://git-scm.com
|
[3]: http://git-scm.com
|
||||||
[4]: https://github.com
|
[4]: https://github.com
|
||||||
[5]: http://gitimmersion.com
|
[5]: http://gitimmersion.com
|
||||||
[6]: http://gitref.org
|
[6]: http://gitref.org
|
||||||
[7]: http://www.bash2zsh.com/zsh_refcard/refcard.pdf
|
[7]: http://www.bash2zsh.com/zsh_refcard/refcard.pdf
|
||||||
[8]: http://grml.org/zsh/zsh-lovers.html
|
[8]: http://grml.org/zsh/zsh-lovers.html
|
||||||
[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
|
[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
|
[11]: http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html
|
||||||
[12]: https://help.github.com/articles/using-pull-requests
|
[12]: https://help.github.com/articles/using-pull-requests
|
||||||
|
|
50
helper.zsh
50
helper.zsh
|
@ -30,62 +30,62 @@ function autoloadable {
|
||||||
( unfunction $1 ; autoload -U +X $1 ) &> /dev/null
|
( unfunction $1 ; autoload -U +X $1 ) &> /dev/null
|
||||||
}
|
}
|
||||||
|
|
||||||
# Loads Oh My Zsh modules.
|
# Loads Prezto modules.
|
||||||
function omodload {
|
function pmodload {
|
||||||
local -a omodules
|
local -a pmodules
|
||||||
local omodule
|
local pmodule
|
||||||
local ofunction_glob='^([_.]*|prompt_*_setup|README*)(.N:t)'
|
local pfunction_glob='^([_.]*|prompt_*_setup|README*)(.N:t)'
|
||||||
|
|
||||||
# $argv is overridden in the anonymous function.
|
# $argv is overridden in the anonymous function.
|
||||||
omodules=("$argv[@]")
|
pmodules=("$argv[@]")
|
||||||
|
|
||||||
# Add functions to $fpath.
|
# Add functions to $fpath.
|
||||||
fpath=(${omodules:+${OMZ}/modules/${^omodules}/functions(/FN)} $fpath)
|
fpath=(${pmodules:+${PREZTO}/modules/${^pmodules}/functions(/FN)} $fpath)
|
||||||
|
|
||||||
function {
|
function {
|
||||||
local ofunction
|
local pfunction
|
||||||
|
|
||||||
# Extended globbing is needed for listing autoloadable function directories.
|
# Extended globbing is needed for listing autoloadable function directories.
|
||||||
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
||||||
|
|
||||||
# Load Oh My Zsh functions.
|
# Load Prezto functions.
|
||||||
for ofunction in $OMZ/modules/${^omodules}/functions/$~ofunction_glob; do
|
for pfunction in $PREZTO/modules/${^pmodules}/functions/$~pfunction_glob; do
|
||||||
autoload -Uz "$ofunction"
|
autoload -Uz "$pfunction"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load Oh My Zsh modules.
|
# Load Prezto modules.
|
||||||
for omodule in "$omodules[@]"; do
|
for pmodule in "$pmodules[@]"; do
|
||||||
if zstyle -t ":omz:module:$omodule" loaded; then
|
if zstyle -t ":prezto:module:$pmodule" loaded; then
|
||||||
continue
|
continue
|
||||||
elif [[ ! -d "$OMZ/modules/$omodule" ]]; then
|
elif [[ ! -d "$PREZTO/modules/$pmodule" ]]; then
|
||||||
print "$0: no such module: $omodule" >&2
|
print "$0: no such module: $pmodule" >&2
|
||||||
continue
|
continue
|
||||||
else
|
else
|
||||||
if [[ -s "$OMZ/modules/$omodule/init.zsh" ]]; then
|
if [[ -s "$PREZTO/modules/$pmodule/init.zsh" ]]; then
|
||||||
source "$OMZ/modules/$omodule/init.zsh"
|
source "$PREZTO/modules/$pmodule/init.zsh"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if (( $? == 0 )); then
|
if (( $? == 0 )); then
|
||||||
zstyle ":omz:module:$omodule" loaded 'yes'
|
zstyle ":prezto:module:$pmodule" loaded 'yes'
|
||||||
else
|
else
|
||||||
# Remove the $fpath entry.
|
# Remove the $fpath entry.
|
||||||
fpath[(r)$OMZ/modules/${omodule}/functions]=()
|
fpath[(r)$PREZTO/modules/${pmodule}/functions]=()
|
||||||
|
|
||||||
function {
|
function {
|
||||||
local ofunction
|
local pfunction
|
||||||
|
|
||||||
# Extended globbing is needed for listing autoloadable function
|
# Extended globbing is needed for listing autoloadable function
|
||||||
# directories.
|
# directories.
|
||||||
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
setopt LOCAL_OPTIONS EXTENDED_GLOB
|
||||||
|
|
||||||
# Unload Oh My Zsh functions.
|
# Unload Prezto functions.
|
||||||
for ofunction in $OMZ/modules/$omodule/functions/$~ofunction_glob; do
|
for pfunction in $PREZTO/modules/$pmodule/functions/$~pfunction_glob; do
|
||||||
unfunction "$ofunction"
|
unfunction "$pfunction"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
zstyle ":omz:module:$omodule" loaded 'no'
|
zstyle ":prezto:module:$pmodule" loaded 'no'
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
21
init.zsh
21
init.zsh
|
@ -1,40 +1,39 @@
|
||||||
#
|
#
|
||||||
# Initializes Oh My Zsh.
|
# Initializes Prezto.
|
||||||
#
|
#
|
||||||
# Authors:
|
# Authors:
|
||||||
# Robby Russell <robby@planetargon.com>
|
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
# Check for the minimum supported version.
|
# Check for the minimum supported version.
|
||||||
min_zsh_version='4.3.10'
|
min_zsh_version='4.3.10'
|
||||||
if ! autoload -Uz is-at-least || ! is-at-least "$min_zsh_version"; then
|
if ! autoload -Uz is-at-least || ! is-at-least "$min_zsh_version"; then
|
||||||
print "omz: old shell detected, minimum required: $min_zsh_version" >&2
|
print "prezto: old shell detected, minimum required: $min_zsh_version" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
unset min_zsh_version
|
unset min_zsh_version
|
||||||
|
|
||||||
# Disable color and theme in dumb terminals.
|
# Disable color and theme in dumb terminals.
|
||||||
if [[ "$TERM" == 'dumb' ]]; then
|
if [[ "$TERM" == 'dumb' ]]; then
|
||||||
zstyle ':omz:*:*' color 'no'
|
zstyle ':prezto:*:*' color 'no'
|
||||||
zstyle ':omz:module:prompt' theme 'off'
|
zstyle ':prezto:module:prompt' theme 'off'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load Zsh modules.
|
# Load Zsh modules.
|
||||||
zstyle -a ':omz:load' zmodule 'zmodules'
|
zstyle -a ':prezto:load' zmodule 'zmodules'
|
||||||
for zmodule ("$zmodules[@]") zmodload "zsh/${(z)zmodule}"
|
for zmodule ("$zmodules[@]") zmodload "zsh/${(z)zmodule}"
|
||||||
unset zmodule{s,}
|
unset zmodule{s,}
|
||||||
|
|
||||||
# Autoload Zsh functions.
|
# Autoload Zsh functions.
|
||||||
zstyle -a ':omz:load' zfunction 'zfunctions'
|
zstyle -a ':prezto:load' zfunction 'zfunctions'
|
||||||
for zfunction ("$zfunctions[@]") autoload -Uz "$zfunction"
|
for zfunction ("$zfunctions[@]") autoload -Uz "$zfunction"
|
||||||
unset zfunction{s,}
|
unset zfunction{s,}
|
||||||
|
|
||||||
# Source files (the order matters).
|
# Source files (the order matters).
|
||||||
source "${0:h}/helper.zsh"
|
source "${0:h}/helper.zsh"
|
||||||
|
|
||||||
# Source modules defined in ~/.zshrc.
|
# Source Prezto modules defined in ~/.zshrc.
|
||||||
zstyle -a ':omz:load' omodule 'omodules'
|
zstyle -a ':prezto:load' pmodule 'pmodules'
|
||||||
omodload "$omodules[@]"
|
pmodload "$pmodules[@]"
|
||||||
unset omodules
|
unset pmodules
|
||||||
|
|
||||||
|
|
|
@ -37,5 +37,5 @@ Authors
|
||||||
|
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [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)
|
- [Joseph Booker](https://github.com/sargas)
|
||||||
|
|
||||||
[1]: https://code.launchpad.net/command-not-found
|
[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)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: https://github.com/zsh-users/zsh-completions
|
[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
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@ zstyle ':completion::complete:*' use-cache on
|
||||||
zstyle ':completion::complete:*' cache-path "$HOME/.zcompcache"
|
zstyle ':completion::complete:*' cache-path "$HOME/.zcompcache"
|
||||||
|
|
||||||
# Case-insensitive (all), partial-word, and then substring completion.
|
# Case-insensitive (all), partial-word, and then substring completion.
|
||||||
if zstyle -t ':omz:module:completion:*' case-sensitive; then
|
if zstyle -t ':prezto:module:completion:*' case-sensitive; then
|
||||||
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
||||||
setopt CASE_GLOB
|
setopt CASE_GLOB
|
||||||
else
|
else
|
||||||
|
|
|
@ -32,5 +32,5 @@ Authors
|
||||||
- [James Cox](https://github.com/imajes)
|
- [James Cox](https://github.com/imajes)
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [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)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: http://wiki.debian.org/Teams/Dpkg
|
[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
|
||||||
|
|
||||||
|
|
|
@ -8,36 +8,36 @@
|
||||||
# To enable key bindings, add the following to zshrc, and replace 'map' with
|
# To enable key bindings, add the following to zshrc, and replace 'map' with
|
||||||
# 'emacs' or 'vi.
|
# 'emacs' or 'vi.
|
||||||
#
|
#
|
||||||
# zstyle ':omz:module:editor' keymap 'map'
|
# zstyle ':prezto:module:editor' keymap 'map'
|
||||||
#
|
#
|
||||||
# To enable the auto conversion of .... to ../.., add the following to zshrc.
|
# To enable the auto conversion of .... to ../.., add the following to zshrc.
|
||||||
#
|
#
|
||||||
# zstyle ':omz:module:editor' dot-expansion 'yes'
|
# zstyle ':prezto:module:editor' dot-expansion 'yes'
|
||||||
#
|
#
|
||||||
# To indicate when the editor is in the primary keymap (emacs or viins), add
|
# To indicate when the editor is in the primary keymap (emacs or viins), add
|
||||||
# the following to your theme prompt setup function.
|
# the following to your theme prompt setup function.
|
||||||
#
|
#
|
||||||
# zstyle ':omz:module:editor:keymap' primary '>>>'
|
# zstyle ':prezto:module:editor:keymap' primary '>>>'
|
||||||
#
|
#
|
||||||
# To indicate when the editor is in the primary keymap (emacs or viins) insert
|
# To indicate when the editor is in the primary keymap (emacs or viins) insert
|
||||||
# mode, add the following to your theme prompt setup function.
|
# mode, add the following to your theme prompt setup function.
|
||||||
#
|
#
|
||||||
# zstyle ':omz:module:editor:keymap:primary' insert 'I'
|
# zstyle ':prezto:module:editor:keymap:primary' insert 'I'
|
||||||
#
|
#
|
||||||
# To indicate when the editor is in the primary keymap (emacs or viins)
|
# To indicate when the editor is in the primary keymap (emacs or viins)
|
||||||
# overwrite mode, add the following to your theme prompt setup function.
|
# overwrite mode, add the following to your theme prompt setup function.
|
||||||
#
|
#
|
||||||
# zstyle ':omz:module:editor:keymap:primary' overwrite 'O'
|
# zstyle ':prezto:module:editor:keymap:primary' overwrite 'O'
|
||||||
#
|
#
|
||||||
# To indicate when the editor is in the alternate keymap (vicmd), add the
|
# To indicate when the editor is in the alternate keymap (vicmd), add the
|
||||||
# following to your theme prompt setup function.
|
# following to your theme prompt setup function.
|
||||||
#
|
#
|
||||||
# zstyle ':omz:module:editor:keymap' alternate '<<<'
|
# zstyle ':prezto:module:editor:keymap' alternate '<<<'
|
||||||
#
|
#
|
||||||
# To indicate when the editor is completing, add the following to your theme
|
# To indicate when the editor is completing, add the following to your theme
|
||||||
# prompt setup function.
|
# prompt setup function.
|
||||||
#
|
#
|
||||||
# zstyle ':omz:module:editor' completing '...'
|
# zstyle ':prezto:module:editor' completing '...'
|
||||||
#
|
#
|
||||||
|
|
||||||
# Return if requirements are not found.
|
# Return if requirements are not found.
|
||||||
|
@ -96,7 +96,7 @@ key_info=(
|
||||||
# Do not bind any keys if there are empty values in $key_info.
|
# Do not bind any keys if there are empty values in $key_info.
|
||||||
for key in "$key_info[@]"; do
|
for key in "$key_info[@]"; do
|
||||||
if [[ -z "$key" ]]; then
|
if [[ -z "$key" ]]; then
|
||||||
print "omz: one or more keys are non-bindable" >&2
|
print "prezto: one or more keys are non-bindable" >&2
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
@ -112,17 +112,17 @@ function editor-info {
|
||||||
typeset -gA editor_info
|
typeset -gA editor_info
|
||||||
|
|
||||||
if [[ "$KEYMAP" == 'vicmd' ]]; then
|
if [[ "$KEYMAP" == 'vicmd' ]]; then
|
||||||
zstyle -s ':omz:module:editor:keymap' alternate 'REPLY'
|
zstyle -s ':prezto:module:editor:keymap' alternate 'REPLY'
|
||||||
editor_info[keymap]="$REPLY"
|
editor_info[keymap]="$REPLY"
|
||||||
else
|
else
|
||||||
zstyle -s ':omz:module:editor:keymap' primary 'REPLY'
|
zstyle -s ':prezto:module:editor:keymap' primary 'REPLY'
|
||||||
editor_info[keymap]="$REPLY"
|
editor_info[keymap]="$REPLY"
|
||||||
|
|
||||||
if [[ "$ZLE_STATE" == *overwrite* ]]; then
|
if [[ "$ZLE_STATE" == *overwrite* ]]; then
|
||||||
zstyle -s ':omz:module:editor:keymap:primary' overwrite 'REPLY'
|
zstyle -s ':prezto:module:editor:keymap:primary' overwrite 'REPLY'
|
||||||
editor_info[overwrite]="$REPLY"
|
editor_info[overwrite]="$REPLY"
|
||||||
else
|
else
|
||||||
zstyle -s ':omz:module:editor:keymap:primary' insert 'REPLY'
|
zstyle -s ':prezto:module:editor:keymap:primary' insert 'REPLY'
|
||||||
editor_info[overwrite]="$REPLY"
|
editor_info[overwrite]="$REPLY"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -199,7 +199,7 @@ zle -N expand-dot-to-parent-directory-path
|
||||||
# Displays an indicator when completing.
|
# Displays an indicator when completing.
|
||||||
function expand-or-complete-with-indicator {
|
function expand-or-complete-with-indicator {
|
||||||
local indicator
|
local indicator
|
||||||
zstyle -s ':omz:module:editor' completing 'indicator'
|
zstyle -s ':prezto:module:editor' completing 'indicator'
|
||||||
print -Pn "$indicator"
|
print -Pn "$indicator"
|
||||||
zle expand-or-complete
|
zle expand-or-complete
|
||||||
zle redisplay
|
zle redisplay
|
||||||
|
@ -313,7 +313,7 @@ for keymap in 'emacs' 'viins'; do
|
||||||
bindkey -M "$keymap" "$key_info[Control]I" expand-or-complete
|
bindkey -M "$keymap" "$key_info[Control]I" expand-or-complete
|
||||||
|
|
||||||
# Expand .... to ../..
|
# Expand .... to ../..
|
||||||
if zstyle -t ':omz:module:editor' dot-expansion; then
|
if zstyle -t ':prezto:module:editor' dot-expansion; then
|
||||||
bindkey -M "$keymap" "." expand-dot-to-parent-directory-path
|
bindkey -M "$keymap" "." expand-dot-to-parent-directory-path
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ for keymap in 'emacs' 'viins'; do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Do not expand .... to ../.. during incremental search.
|
# Do not expand .... to ../.. during incremental search.
|
||||||
if zstyle -t ':omz:module:editor' dot-expansion; then
|
if zstyle -t ':prezto:module:editor' dot-expansion; then
|
||||||
bindkey -M isearch . self-insert 2> /dev/null
|
bindkey -M isearch . self-insert 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -335,13 +335,13 @@ fi
|
||||||
#
|
#
|
||||||
|
|
||||||
# Set the key layout.
|
# Set the key layout.
|
||||||
zstyle -s ':omz:module:editor' keymap 'keymap'
|
zstyle -s ':prezto:module:editor' keymap 'keymap'
|
||||||
if [[ "$keymap" == (emacs|) ]]; then
|
if [[ "$keymap" == (emacs|) ]]; then
|
||||||
bindkey -e
|
bindkey -e
|
||||||
elif [[ "$keymap" == vi ]]; then
|
elif [[ "$keymap" == vi ]]; then
|
||||||
bindkey -v
|
bindkey -v
|
||||||
else
|
else
|
||||||
print "omz: invalid keymap: $keymap" >&2
|
print "prezto: invalid keymap: $keymap" >&2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
unset key{map,}
|
unset key{map,}
|
||||||
|
|
|
@ -22,5 +22,5 @@ Authors
|
||||||
|
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [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
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ unsetopt CHECK_JOBS # Don't report on jobs when shell exit.
|
||||||
# Grep
|
# Grep
|
||||||
#
|
#
|
||||||
|
|
||||||
if zstyle -t ':omz:environment:grep' color; then
|
if zstyle -t ':prezto:environment:grep' color; then
|
||||||
export GREP_COLOR='37;45'
|
export GREP_COLOR='37;45'
|
||||||
export GREP_OPTIONS='--color=auto'
|
export GREP_OPTIONS='--color=auto'
|
||||||
fi
|
fi
|
||||||
|
@ -44,7 +44,7 @@ fi
|
||||||
# Termcap
|
# Termcap
|
||||||
#
|
#
|
||||||
|
|
||||||
if zstyle -t ':omz:environment:termcap' color; then
|
if zstyle -t ':prezto:environment:termcap' color; then
|
||||||
export LESS_TERMCAP_mb=$'\E[01;31m' # Begins blinking.
|
export LESS_TERMCAP_mb=$'\E[01;31m' # Begins blinking.
|
||||||
export LESS_TERMCAP_md=$'\E[01;31m' # Begins bold.
|
export LESS_TERMCAP_md=$'\E[01;31m' # Begins bold.
|
||||||
export LESS_TERMCAP_me=$'\E[0m' # Ends mode.
|
export LESS_TERMCAP_me=$'\E[0m' # Ends mode.
|
||||||
|
|
|
@ -8,64 +8,64 @@
|
||||||
# Define the following styles in a prompt theme setup function.
|
# Define the following styles in a prompt theme setup function.
|
||||||
#
|
#
|
||||||
# # %s - Special action name (am, merge, rebase).
|
# # %s - Special action name (am, merge, rebase).
|
||||||
# zstyle ':omz:module:git' action 'action:%s'
|
# zstyle ':prezto:module:git' action 'action:%s'
|
||||||
#
|
#
|
||||||
# # %a - Indicator to notify of added files.
|
# # %a - Indicator to notify of added files.
|
||||||
# zstyle ':omz:module:git' added 'added:%a'
|
# zstyle ':prezto:module:git' added 'added:%a'
|
||||||
#
|
#
|
||||||
# # %A - Indicator to notify of ahead branch.
|
# # %A - Indicator to notify of ahead branch.
|
||||||
# zstyle ':omz:module:git' ahead 'ahead:%A'
|
# zstyle ':prezto:module:git' ahead 'ahead:%A'
|
||||||
#
|
#
|
||||||
# # %B - Indicator to notify of behind branch.
|
# # %B - Indicator to notify of behind branch.
|
||||||
# zstyle ':omz:module:git' behind 'behind:%B'
|
# zstyle ':prezto:module:git' behind 'behind:%B'
|
||||||
#
|
#
|
||||||
# # %b - Branch name.
|
# # %b - Branch name.
|
||||||
# zstyle ':omz:module:git' branch 'branch:%b'
|
# zstyle ':prezto:module:git' branch 'branch:%b'
|
||||||
#
|
#
|
||||||
# # %C - Indicator to notify of a clean working directory.
|
# # %C - Indicator to notify of a clean working directory.
|
||||||
# zstyle ':omz:module:git' clean 'clean'
|
# zstyle ':prezto:module:git' clean 'clean'
|
||||||
#
|
#
|
||||||
# # %c - SHA-1 hash.
|
# # %c - SHA-1 hash.
|
||||||
# zstyle ':omz:module:git' commit 'commit:%c'
|
# zstyle ':prezto:module:git' commit 'commit:%c'
|
||||||
#
|
#
|
||||||
# # %d - Indicator to notify of deleted files.
|
# # %d - Indicator to notify of deleted files.
|
||||||
# zstyle ':omz:module:git' deleted 'deleted:%d'
|
# zstyle ':prezto:module:git' deleted 'deleted:%d'
|
||||||
#
|
#
|
||||||
# # %D - Indicator to notify of dirty files.
|
# # %D - Indicator to notify of dirty files.
|
||||||
# zstyle ':omz:module:git' dirty 'dirty:%D'
|
# zstyle ':prezto:module:git' dirty 'dirty:%D'
|
||||||
#
|
#
|
||||||
# # %m - Indicator to notify of modified files.
|
# # %m - Indicator to notify of modified files.
|
||||||
# zstyle ':omz:module:git' modified 'modified:%m'
|
# zstyle ':prezto:module:git' modified 'modified:%m'
|
||||||
#
|
#
|
||||||
# # %p - HEAD position in relation to the nearest branch, remote, tag.
|
# # %p - HEAD position in relation to the nearest branch, remote, tag.
|
||||||
# zstyle ':omz:module:git' position 'position:%p'
|
# zstyle ':prezto:module:git' position 'position:%p'
|
||||||
#
|
#
|
||||||
# # %R - Remote name.
|
# # %R - Remote name.
|
||||||
# zstyle ':omz:moduleit' remote 'remote:%R'
|
# zstyle ':prezto:moduleit' remote 'remote:%R'
|
||||||
#
|
#
|
||||||
# # %r - Indicator to notify of renamed files.
|
# # %r - Indicator to notify of renamed files.
|
||||||
# zstyle ':omz:module:git' renamed 'renamed:%r'
|
# zstyle ':prezto:module:git' renamed 'renamed:%r'
|
||||||
#
|
#
|
||||||
# # %S - Indicator to notify of stashed files.
|
# # %S - Indicator to notify of stashed files.
|
||||||
# zstyle ':omz:module:git' stashed 'stashed:%S'
|
# zstyle ':prezto:module:git' stashed 'stashed:%S'
|
||||||
#
|
#
|
||||||
# # %U - Indicator to notify of unmerged files.
|
# # %U - Indicator to notify of unmerged files.
|
||||||
# zstyle ':omz:module:git' unmerged 'unmerged:%U'
|
# zstyle ':prezto:module:git' unmerged 'unmerged:%U'
|
||||||
#
|
#
|
||||||
# # %u - Indicator to notify of untracked files.
|
# # %u - Indicator to notify of untracked files.
|
||||||
# zstyle ':omz:module:git' untracked 'untracked:%u'
|
# zstyle ':prezto:module:git' untracked 'untracked:%u'
|
||||||
#
|
#
|
||||||
# # Ignore submodule when it is 'dirty', 'untracked', 'all', or 'none'.
|
# # Ignore submodule when it is 'dirty', 'untracked', 'all', or 'none'.
|
||||||
# zstyle ':omz:module:git:ignore' submodule ''
|
# zstyle ':prezto:module:git:ignore' submodule ''
|
||||||
#
|
#
|
||||||
# # Prompts.
|
# # Prompts.
|
||||||
# zstyle ':omz:module:git' info \
|
# zstyle ':prezto:module:git' info \
|
||||||
# 'prompt' ' git:(%b%C%D)' \
|
# 'prompt' ' git:(%b%C%D)' \
|
||||||
# 'rprompt' ''
|
# 'rprompt' ''
|
||||||
#
|
#
|
||||||
|
|
||||||
# Load dependencies.
|
# Load dependencies.
|
||||||
omodload 'trap'
|
pmodload 'trap'
|
||||||
|
|
||||||
# Gets the Git special action (am, bisect, cherry, merge, rebase).
|
# Gets the Git special action (am, bisect, cherry, merge, rebase).
|
||||||
# Borrowed from vcs_info and edited.
|
# Borrowed from vcs_info and edited.
|
||||||
|
@ -261,7 +261,7 @@ function git-info {
|
||||||
ahead_and_behind_cmd='git rev-list --count --left-right HEAD...@{upstream}'
|
ahead_and_behind_cmd='git rev-list --count --left-right HEAD...@{upstream}'
|
||||||
|
|
||||||
# Ignore submodule status.
|
# Ignore submodule status.
|
||||||
zstyle -s ':omz:module:git:ignore' submodule 'ignore_submodule'
|
zstyle -s ':prezto:module:git:ignore' submodule 'ignore_submodule'
|
||||||
if [[ -n "$ignore_submodule" ]]; then
|
if [[ -n "$ignore_submodule" ]]; then
|
||||||
status_cmd+=" --ignore-submodules=${ignore_submodule}"
|
status_cmd+=" --ignore-submodules=${ignore_submodule}"
|
||||||
fi
|
fi
|
||||||
|
@ -269,21 +269,21 @@ function git-info {
|
||||||
# Format commit.
|
# Format commit.
|
||||||
commit="$(git rev-parse HEAD 2> /dev/null)"
|
commit="$(git rev-parse HEAD 2> /dev/null)"
|
||||||
if [[ -n "$commit" ]]; then
|
if [[ -n "$commit" ]]; then
|
||||||
zstyle -s ':omz:module:git' commit 'commit_format'
|
zstyle -s ':prezto:module:git' commit 'commit_format'
|
||||||
zformat -f commit_formatted "$commit_format" "c:$commit"
|
zformat -f commit_formatted "$commit_format" "c:$commit"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format stashed.
|
# Format stashed.
|
||||||
if [[ -f "$(git-dir)/refs/stash" ]]; then
|
if [[ -f "$(git-dir)/refs/stash" ]]; then
|
||||||
stashed="$(git stash list 2> /dev/null | wc -l | awk '{print $1}')"
|
stashed="$(git stash list 2> /dev/null | wc -l | awk '{print $1}')"
|
||||||
zstyle -s ':omz:module:git' stashed 'stashed_format'
|
zstyle -s ':prezto:module:git' stashed 'stashed_format'
|
||||||
zformat -f stashed_formatted "$stashed_format" "S:$stashed"
|
zformat -f stashed_formatted "$stashed_format" "S:$stashed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format action.
|
# Format action.
|
||||||
action="$(_git-action)"
|
action="$(_git-action)"
|
||||||
if [[ -n "$action" ]]; then
|
if [[ -n "$action" ]]; then
|
||||||
zstyle -s ':omz:module:git' action 'action_format'
|
zstyle -s ':prezto:module:git' action 'action_format'
|
||||||
zformat -f action_formatted "$action_format" "s:$action"
|
zformat -f action_formatted "$action_format" "s:$action"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -304,13 +304,13 @@ function git-info {
|
||||||
# Format branch.
|
# Format branch.
|
||||||
branch="${$(git symbolic-ref -q HEAD)##refs/heads/}"
|
branch="${$(git symbolic-ref -q HEAD)##refs/heads/}"
|
||||||
if [[ -n "$branch" ]]; then
|
if [[ -n "$branch" ]]; then
|
||||||
zstyle -s ':omz:module:git' branch 'branch_format'
|
zstyle -s ':prezto:module:git' branch 'branch_format'
|
||||||
zformat -f branch_formatted "$branch_format" "b:$branch"
|
zformat -f branch_formatted "$branch_format" "b:$branch"
|
||||||
|
|
||||||
# Format remote.
|
# Format remote.
|
||||||
remote="${$(${(z)remote_cmd} 2> /dev/null)##refs/remotes/}"
|
remote="${$(${(z)remote_cmd} 2> /dev/null)##refs/remotes/}"
|
||||||
if [[ -n "$remote" ]]; then
|
if [[ -n "$remote" ]]; then
|
||||||
zstyle -s ':omz:module:git' remote 'remote_format'
|
zstyle -s ':prezto:module:git' remote 'remote_format'
|
||||||
zformat -f remote_formatted "$remote_format" "R:$remote"
|
zformat -f remote_formatted "$remote_format" "R:$remote"
|
||||||
|
|
||||||
# Get ahead and behind counts.
|
# Get ahead and behind counts.
|
||||||
|
@ -319,14 +319,14 @@ function git-info {
|
||||||
# Format ahead.
|
# Format ahead.
|
||||||
ahead="$ahead_and_behind[(w)1]"
|
ahead="$ahead_and_behind[(w)1]"
|
||||||
if (( $ahead > 0 )); then
|
if (( $ahead > 0 )); then
|
||||||
zstyle -s ':omz:module:git' ahead 'ahead_format'
|
zstyle -s ':prezto:module:git' ahead 'ahead_format'
|
||||||
zformat -f ahead_formatted "$ahead_format" "A:$ahead"
|
zformat -f ahead_formatted "$ahead_format" "A:$ahead"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format behind.
|
# Format behind.
|
||||||
behind="$ahead_and_behind[(w)2]"
|
behind="$ahead_and_behind[(w)2]"
|
||||||
if (( $behind > 0 )); then
|
if (( $behind > 0 )); then
|
||||||
zstyle -s ':omz:module:git' behind 'behind_format'
|
zstyle -s ':prezto:module:git' behind 'behind_format'
|
||||||
zformat -f behind_formatted "$behind_format" "B:$behind"
|
zformat -f behind_formatted "$behind_format" "B:$behind"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -334,57 +334,57 @@ function git-info {
|
||||||
# Format position.
|
# Format position.
|
||||||
position="$(git describe --contains --all HEAD 2> /dev/null)"
|
position="$(git describe --contains --all HEAD 2> /dev/null)"
|
||||||
if [[ -n "$position" ]]; then
|
if [[ -n "$position" ]]; then
|
||||||
zstyle -s ':omz:module:git' position 'position_format'
|
zstyle -s ':prezto:module:git' position 'position_format'
|
||||||
zformat -f position_formatted "$position_format" "p:$position"
|
zformat -f position_formatted "$position_format" "p:$position"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format added.
|
# Format added.
|
||||||
if (( $added > 0 )); then
|
if (( $added > 0 )); then
|
||||||
zstyle -s ':omz:module:git' added 'added_format'
|
zstyle -s ':prezto:module:git' added 'added_format'
|
||||||
zformat -f added_formatted "$added_format" "a:$added_format"
|
zformat -f added_formatted "$added_format" "a:$added_format"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format deleted.
|
# Format deleted.
|
||||||
if (( $deleted > 0 )); then
|
if (( $deleted > 0 )); then
|
||||||
zstyle -s ':omz:module:git' deleted 'deleted_format'
|
zstyle -s ':prezto:module:git' deleted 'deleted_format'
|
||||||
zformat -f deleted_formatted "$deleted_format" "d:$deleted_format"
|
zformat -f deleted_formatted "$deleted_format" "d:$deleted_format"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format modified.
|
# Format modified.
|
||||||
if (( $modified > 0 )); then
|
if (( $modified > 0 )); then
|
||||||
zstyle -s ':omz:module:git' modified 'modified_format'
|
zstyle -s ':prezto:module:git' modified 'modified_format'
|
||||||
zformat -f modified_formatted "$modified_format" "m:$modified"
|
zformat -f modified_formatted "$modified_format" "m:$modified"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format renamed.
|
# Format renamed.
|
||||||
if (( $renamed > 0 )); then
|
if (( $renamed > 0 )); then
|
||||||
zstyle -s ':omz:module:git' renamed 'renamed_format'
|
zstyle -s ':prezto:module:git' renamed 'renamed_format'
|
||||||
zformat -f renamed_formatted "$renamed_format" "r:$renamed"
|
zformat -f renamed_formatted "$renamed_format" "r:$renamed"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format unmerged.
|
# Format unmerged.
|
||||||
if (( $unmerged > 0 )); then
|
if (( $unmerged > 0 )); then
|
||||||
zstyle -s ':omz:module:git' unmerged 'unmerged_format'
|
zstyle -s ':prezto:module:git' unmerged 'unmerged_format'
|
||||||
zformat -f unmerged_formatted "$unmerged_format" "U:$unmerged"
|
zformat -f unmerged_formatted "$unmerged_format" "U:$unmerged"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format untracked.
|
# Format untracked.
|
||||||
if (( $untracked > 0 )); then
|
if (( $untracked > 0 )); then
|
||||||
zstyle -s ':omz:module:git' untracked 'untracked_format'
|
zstyle -s ':prezto:module:git' untracked 'untracked_format'
|
||||||
zformat -f untracked_formatted "$untracked_format" "u:$untracked"
|
zformat -f untracked_formatted "$untracked_format" "u:$untracked"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format dirty and clean.
|
# Format dirty and clean.
|
||||||
if (( $dirty > 0 )); then
|
if (( $dirty > 0 )); then
|
||||||
zstyle -s ':omz:module:git' dirty 'dirty_format'
|
zstyle -s ':prezto:module:git' dirty 'dirty_format'
|
||||||
zformat -f dirty_formatted "$dirty_format" "D:$dirty"
|
zformat -f dirty_formatted "$dirty_format" "D:$dirty"
|
||||||
else
|
else
|
||||||
zstyle -s ':omz:module:git' clean 'clean_formatted'
|
zstyle -s ':prezto:module:git' clean 'clean_formatted'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Format info.
|
# Format info.
|
||||||
zstyle -a ':omz:module:git' info 'info_formats'
|
zstyle -a ':prezto:module:git' info 'info_formats'
|
||||||
for info_format in ${(k)info_formats}; do
|
for info_format in ${(k)info_formats}; do
|
||||||
zformat -f REPLY "$info_formats[$info_format]" \
|
zformat -f REPLY "$info_formats[$info_format]" \
|
||||||
"A:$ahead_formatted" \
|
"A:$ahead_formatted" \
|
||||||
|
|
|
@ -20,7 +20,7 @@ Settings
|
||||||
To use a different prefix, add the following to *zshrc*, and replace 'g' with
|
To use a different prefix, add the following to *zshrc*, and replace 'g' with
|
||||||
the desired prefix:
|
the desired prefix:
|
||||||
|
|
||||||
zstyle ':omz:module:gnu-utility' prefix 'g'
|
zstyle ':prezto:module:gnu-utility' prefix 'g'
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
|
@ -29,5 +29,5 @@ Authors
|
||||||
|
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [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
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Get the prefix or use the default.
|
# Get the prefix or use the default.
|
||||||
zstyle -s ':omz:module:gnu-utility' prefix '_gnu_utility_p' || _gnu_utility_p='g'
|
zstyle -s ':prezto:module:gnu-utility' prefix '_gnu_utility_p' || _gnu_utility_p='g'
|
||||||
|
|
||||||
# Return if requirements are not found.
|
# Return if requirements are not found.
|
||||||
if (( ! ${+commands[${_gnu_utility_p}whoami]} )); then
|
if (( ! ${+commands[${_gnu_utility_p}whoami]} )); then
|
||||||
|
|
|
@ -12,5 +12,5 @@ Authors
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: http://linux.die.net/man/1/gpg-agent
|
[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)
|
- [Sebastian Wiesner](https://github.com/lunaryorn)
|
||||||
|
|
||||||
[1]: http://www.haskell.org/cabal/
|
[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
|
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
|
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
|
part of a previously entered command and press up and down to cycle through
|
||||||
matching commands.
|
matching commands.
|
||||||
|
@ -24,7 +24,7 @@ Settings
|
||||||
To enable case-sensitivity for this module only, add the following line to
|
To enable case-sensitivity for this module only, add the following line to
|
||||||
*zshrc*:
|
*zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:history-substring-search' case-sensitive 'yes'
|
zstyle ':prezto:module:history-substring-search' case-sensitive 'yes'
|
||||||
|
|
||||||
### Highlighting
|
### Highlighting
|
||||||
|
|
||||||
|
@ -33,7 +33,7 @@ positive results.
|
||||||
|
|
||||||
To enable highlighting for this module only, add the following line to *zshrc*:
|
To enable highlighting for this module only, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:history-substring-search' color 'yes'
|
zstyle ':prezto:module:history-substring-search' color 'yes'
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
|
@ -45,5 +45,5 @@ Authors
|
||||||
|
|
||||||
[1]: https://github.com/zsh-users/zsh-history-substring-search
|
[1]: https://github.com/zsh-users/zsh-history-substring-search
|
||||||
[2]: http://fishshell.com
|
[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:
|
# Authors:
|
||||||
# Suraj N. Kurapati <sunaku@gmail.com>
|
# Suraj N. Kurapati <sunaku@gmail.com>
|
||||||
|
@ -7,7 +7,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Load dependencies.
|
# Load dependencies.
|
||||||
omodload 'editor'
|
pmodload 'editor'
|
||||||
|
|
||||||
# Source module files.
|
# Source module files.
|
||||||
source "${0:h}/external/zsh-history-substring-search.zsh"
|
source "${0:h}/external/zsh-history-substring-search.zsh"
|
||||||
|
@ -16,11 +16,11 @@ source "${0:h}/external/zsh-history-substring-search.zsh"
|
||||||
# Styles
|
# Styles
|
||||||
#
|
#
|
||||||
|
|
||||||
if zstyle -t ':omz:module:history-substring-search' case-sensitive; then
|
if zstyle -t ':prezto:module:history-substring-search' case-sensitive; then
|
||||||
unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS
|
unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! zstyle -t ':omz:module:history-substring-search' color; then
|
if ! zstyle -t ':prezto:module:history-substring-search' color; then
|
||||||
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND}
|
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_{FOUND,NOT_FOUND}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -40,5 +40,5 @@ Authors
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: http://zsh.sourceforge.net/Guide/zshguide02.html#l16
|
[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)
|
- [Matt Cable](https://github.com/curiousstranger)
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [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
|
[1]: http://nodejs.org
|
||||||
[2]: http://npmjs.org
|
[2]: http://npmjs.org
|
||||||
[3]: http://nodejs.org/api
|
[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/
|
[1]: http://www.apple.com/macosx/
|
||||||
[2]: http://bruji.com/bwana/
|
[2]: http://bruji.com/bwana/
|
||||||
[3]: http://www.iterm2.com/
|
[3]: http://www.iterm2.com/
|
||||||
[4]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
[4]: https://github.com/sorin-ionescu/prezto/issues
|
||||||
|
|
||||||
|
|
|
@ -10,14 +10,14 @@ Settings
|
||||||
To enable a Pacman frontend, for example, [Yaourt][2], add the following line to
|
To enable a Pacman frontend, for example, [Yaourt][2], add the following line to
|
||||||
*zshrc*:
|
*zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:pacman' frontend 'yaourt'
|
zstyle ':prezto:module:pacman' frontend 'yaourt'
|
||||||
|
|
||||||
If you have enabled color globally in *zshrc*, you may disable it for certain
|
If you have enabled color globally in *zshrc*, you may disable it for certain
|
||||||
commands.
|
commands.
|
||||||
|
|
||||||
To disable `yaourt` highlighting, add the following line to *zshrc*:
|
To disable `yaourt` highlighting, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:pacman:yaourt' color 'no'
|
zstyle ':prezto:module:pacman:yaourt' color 'no'
|
||||||
|
|
||||||
Aliases
|
Aliases
|
||||||
-------
|
-------
|
||||||
|
@ -62,5 +62,5 @@ Authors
|
||||||
|
|
||||||
[1]: http://www.archlinux.org/pacman/
|
[1]: http://www.archlinux.org/pacman/
|
||||||
[2]: http://archlinux.fr/yaourt-en
|
[2]: http://archlinux.fr/yaourt-en
|
||||||
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
[3]: https://github.com/sorin-ionescu/prezto/issues
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ fi
|
||||||
#
|
#
|
||||||
|
|
||||||
# Get the Pacman frontend.
|
# Get the Pacman frontend.
|
||||||
zstyle -s ':omz:module:pacman' frontend '_pacman_frontend'
|
zstyle -s ':prezto:module:pacman' frontend '_pacman_frontend'
|
||||||
|
|
||||||
if (( $+commands[$_pacman_frontend] )); then
|
if (( $+commands[$_pacman_frontend] )); then
|
||||||
alias pacman="$_pacman_frontend"
|
alias pacman="$_pacman_frontend"
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Disable color.
|
# Disable color.
|
||||||
if ! zstyle -t ':omz:module:pacman:yaourt' color; then
|
if ! zstyle -t ':prezto:module:pacman:yaourt' color; then
|
||||||
alias pacman='pacman --nocolor'
|
alias pacman='pacman --nocolor'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -60,5 +60,5 @@ Authors
|
||||||
|
|
||||||
[1]: http://www.perl.org
|
[1]: http://www.perl.org
|
||||||
[2]: http://perlbrew.pl
|
[2]: http://perlbrew.pl
|
||||||
[3]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
[3]: https://github.com/sorin-ionescu/prezto/issues
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ To select a prompt theme, add the following to *zshrc*, and replace **name**
|
||||||
with the name of the theme you wish to load. Setting it to **random** will load
|
with the name of the theme you wish to load. Setting it to **random** will load
|
||||||
a random theme.
|
a random theme.
|
||||||
|
|
||||||
zstyle ':omz:module:prompt' theme 'name'
|
zstyle ':prezto:module:prompt' theme 'name'
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
|
@ -20,5 +20,5 @@ Authors
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: http://zsh.sourceforge.net/Doc/Release/User-Contributions.html#Prompt-Themes
|
[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
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
#
|
#
|
||||||
# Screenshots:
|
# Screenshots:
|
||||||
# http://i.imgur.com/aipDQ.png
|
# http://i.imgur.com/4CeOj.png
|
||||||
#
|
#
|
||||||
|
|
||||||
function prompt_sorin_precmd {
|
function prompt_sorin_precmd {
|
||||||
|
@ -28,23 +28,23 @@ function prompt_sorin_setup {
|
||||||
# Add hook for calling git-info before each command.
|
# Add hook for calling git-info before each command.
|
||||||
add-zsh-hook precmd prompt_sorin_precmd
|
add-zsh-hook precmd prompt_sorin_precmd
|
||||||
|
|
||||||
zstyle ':omz:module:editor' completing '%B%F{red}...%f%b'
|
zstyle ':prezto:module:editor' completing '%B%F{red}...%f%b'
|
||||||
zstyle ':omz:module:editor:keymap:primary' overwrite ' %F{red}♺%f'
|
zstyle ':prezto:module:editor:keymap:primary' overwrite ' %F{red}♺%f'
|
||||||
zstyle ':omz:module:editor:keymap' alternate ' %F{yellow}❮%f%B%F{red}❮%f%b%F{red}❮%f'
|
zstyle ':prezto:module:editor:keymap' alternate ' %F{yellow}❮%f%B%F{red}❮%f%b%F{red}❮%f'
|
||||||
zstyle ':omz:module:git' action ':%%B%F{yellow}%s%f%%b'
|
zstyle ':prezto:module:git' action ':%%B%F{yellow}%s%f%%b'
|
||||||
zstyle ':omz:module:git' added ' %%B%F{green}✚%f%%b'
|
zstyle ':prezto:module:git' added ' %%B%F{green}✚%f%%b'
|
||||||
zstyle ':omz:module:git' ahead ' %%B%F{yellow}⬆%f%%b'
|
zstyle ':prezto:module:git' ahead ' %%B%F{yellow}⬆%f%%b'
|
||||||
zstyle ':omz:module:git' behind ' %%B%F{yellow}⬇%f%%b'
|
zstyle ':prezto:module:git' behind ' %%B%F{yellow}⬇%f%%b'
|
||||||
zstyle ':omz:module:git' branch ':%F{red}%b%f'
|
zstyle ':prezto:module:git' branch ':%F{red}%b%f'
|
||||||
zstyle ':omz:module:git' commit ':%F{green}%.7c%f'
|
zstyle ':prezto:module:git' commit ':%F{green}%.7c%f'
|
||||||
zstyle ':omz:module:git' deleted ' %%B%F{red}✖%f%%b'
|
zstyle ':prezto:module:git' deleted ' %%B%F{red}✖%f%%b'
|
||||||
zstyle ':omz:module:git' modified ' %%B%F{blue}✱%f%%b'
|
zstyle ':prezto:module:git' modified ' %%B%F{blue}✱%f%%b'
|
||||||
zstyle ':omz:module:git' position ':%F{green}%p%f'
|
zstyle ':prezto:module:git' position ':%F{green}%p%f'
|
||||||
zstyle ':omz:module:git' renamed ' %%B%F{magenta}➜%f%%b'
|
zstyle ':prezto:module:git' renamed ' %%B%F{magenta}➜%f%%b'
|
||||||
zstyle ':omz:module:git' stashed ' %%B%F{cyan}✭%f%%b'
|
zstyle ':prezto:module:git' stashed ' %%B%F{cyan}✭%f%%b'
|
||||||
zstyle ':omz:module:git' unmerged ' %%B%F{yellow}═%f%%b'
|
zstyle ':prezto:module:git' unmerged ' %%B%F{yellow}═%f%%b'
|
||||||
zstyle ':omz:module:git' untracked ' %%B%F{white}◼%f%%b'
|
zstyle ':prezto:module:git' untracked ' %%B%F{white}◼%f%%b'
|
||||||
zstyle ':omz:module:git' info \
|
zstyle ':prezto:module:git' info \
|
||||||
'prompt' ' %F{blue}git%f$(coalesce "%b" "%p" "%c")%s' \
|
'prompt' ' %F{blue}git%f$(coalesce "%b" "%p" "%c")%s' \
|
||||||
'rprompt' '%A%B%S%a%d%m%r%U%u'
|
'rprompt' '%A%B%S%a%d%m%r%U%u'
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ function prompt_steeef_setup {
|
||||||
zstyle ':vcs_info:*:prompt:*' nvcsformats ""
|
zstyle ':vcs_info:*:prompt:*' nvcsformats ""
|
||||||
|
|
||||||
# Set python-info parameters.
|
# Set python-info parameters.
|
||||||
zstyle ':omz:module:python' virtualenv '(%v)'
|
zstyle ':prezto:module:python' virtualenv '(%v)'
|
||||||
|
|
||||||
# Define prompts.
|
# Define prompts.
|
||||||
PROMPT="
|
PROMPT="
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
autoload -Uz promptinit && promptinit
|
autoload -Uz promptinit && promptinit
|
||||||
|
|
||||||
# Load the prompt theme.
|
# Load the prompt theme.
|
||||||
zstyle -a ':omz:module:prompt' theme 'prompt_argv'
|
zstyle -a ':prezto:module:prompt' theme 'prompt_argv'
|
||||||
if (( $#prompt_argv > 0 )); then
|
if (( $#prompt_argv > 0 )); then
|
||||||
prompt "$prompt_argv[@]"
|
prompt "$prompt_argv[@]"
|
||||||
else
|
else
|
||||||
|
|
|
@ -67,7 +67,7 @@ To display the name of the current virtual enviroment in a prompt, define the
|
||||||
following style in the `prompt_theme_setup` function.
|
following style in the `prompt_theme_setup` function.
|
||||||
|
|
||||||
# %v - virtualenv name.
|
# %v - virtualenv name.
|
||||||
zstyle ':omz:module:python' virtualenv 'virtualenv:%v'
|
zstyle ':prezto:module:python' virtualenv 'virtualenv:%v'
|
||||||
|
|
||||||
Then add `$python_info[virtualenv]` to `$PROMPT` or `$RPROMPT` and call
|
Then add `$python_info[virtualenv]` to `$PROMPT` or `$RPROMPT` and call
|
||||||
`python-info` in the `prompt_theme_preexec` hook function.
|
`python-info` in the `prompt_theme_preexec` hook function.
|
||||||
|
@ -105,5 +105,5 @@ Authors
|
||||||
[2]: http://www.doughellmann.com/projects/virtualenvwrapper/
|
[2]: http://www.doughellmann.com/projects/virtualenvwrapper/
|
||||||
[3]: http://pypi.python.org/pypi/virtualenv
|
[3]: http://pypi.python.org/pypi/virtualenv
|
||||||
[4]: http://saghul.github.com/pythonz/
|
[4]: http://saghul.github.com/pythonz/
|
||||||
[5]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
[5]: https://github.com/sorin-ionescu/prezto/issues
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ typeset -gA python_info
|
||||||
|
|
||||||
# Format virtualenv.
|
# Format virtualenv.
|
||||||
if [[ -n "$VIRTUAL_ENV" ]]; then
|
if [[ -n "$VIRTUAL_ENV" ]]; then
|
||||||
zstyle -s ':omz:module:python' virtualenv 'virtualenv_format'
|
zstyle -s ':prezto:module:python' virtualenv 'virtualenv_format'
|
||||||
zformat -f virtualenv_formatted "$virtualenv_format" "v:${VIRTUAL_ENV:t}"
|
zformat -f virtualenv_formatted "$virtualenv_format" "v:${VIRTUAL_ENV:t}"
|
||||||
python_info[virtualenv]="$virtualenv_formatted"
|
python_info[virtualenv]="$virtualenv_formatted"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -31,5 +31,5 @@ Authors
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: http://rubyonrails.org
|
[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
|
[1]: http://rsync.samba.org
|
||||||
[2]: http://www.bombich.com/rsync.html
|
[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
|
||||||
|
|
||||||
|
|
|
@ -67,5 +67,5 @@ Authors
|
||||||
[2]: https://rvm.io
|
[2]: https://rvm.io
|
||||||
[3]: https://github.com/sstephenson/rbenv
|
[3]: https://github.com/sstephenson/rbenv
|
||||||
[4]: http://gembundler.com
|
[4]: http://gembundler.com
|
||||||
[5]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
[5]: https://github.com/sorin-ionescu/prezto/issues
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ Starts a GNU Screen session automatically when Zsh is launched.
|
||||||
|
|
||||||
To enable this feature, add the following line to *zshrc*:
|
To enable this feature, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:screen' auto-start 'yes'
|
zstyle ':prezto:module:screen' auto-start 'yes'
|
||||||
|
|
||||||
Aliases
|
Aliases
|
||||||
-------
|
-------
|
||||||
|
@ -30,5 +30,5 @@ Authors
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: http://www.gnu.org/software/screen/
|
[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
|
||||||
|
|
||||||
|
|
|
@ -14,7 +14,7 @@ fi
|
||||||
# Auto Start
|
# Auto Start
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z "$STY" ]] && zstyle -t ':omz:module:screen' auto-start; then
|
if [[ -z "$STY" ]] && zstyle -t ':prezto:module:screen' auto-start; then
|
||||||
session="$(
|
session="$(
|
||||||
screen -list 2> /dev/null \
|
screen -list 2> /dev/null \
|
||||||
| sed '1d;$d' \
|
| sed '1d;$d' \
|
||||||
|
|
|
@ -10,13 +10,13 @@ Settings
|
||||||
|
|
||||||
To enable ssh-agent forwarding, add the following line to *zshrc*:
|
To enable ssh-agent forwarding, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:ssh-agent' forwarding 'yes'
|
zstyle ':prezto:module:ssh-agent' forwarding 'yes'
|
||||||
|
|
||||||
### Identities
|
### Identities
|
||||||
|
|
||||||
To load multiple identities, add the following line to *zshrc*:
|
To load multiple identities, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github'
|
zstyle ':prezto:module:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github'
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
|
@ -32,5 +32,5 @@ Authors
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: http://www.openbsd.org/cgi-bin/man.cgi?query=ssh-agent&sektion=1
|
[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
|
||||||
|
|
||||||
|
|
|
@ -29,7 +29,7 @@ function _ssh-agent-start {
|
||||||
source "${_ssh_agent_env}" > /dev/null
|
source "${_ssh_agent_env}" > /dev/null
|
||||||
|
|
||||||
# Load identities.
|
# Load identities.
|
||||||
zstyle -a ':omz:module:ssh-agent' identities 'identities'
|
zstyle -a ':prezto:module:ssh-agent' identities 'identities'
|
||||||
|
|
||||||
if (( ${#identities} > 0 )); then
|
if (( ${#identities} > 0 )); then
|
||||||
ssh-add "${HOME}/.ssh/${^identities[@]}"
|
ssh-add "${HOME}/.ssh/${^identities[@]}"
|
||||||
|
@ -39,7 +39,7 @@ function _ssh-agent-start {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Test if agent-forwarding is enabled.
|
# Test if agent-forwarding is enabled.
|
||||||
zstyle -b ':omz:module:ssh-agent' forwarding '_ssh_agent_forwarding'
|
zstyle -b ':prezto:module:ssh-agent' forwarding '_ssh_agent_forwarding'
|
||||||
if is-true "${_ssh_agent_forwarding}" && [[ -n "$SSH_AUTH_SOCK" ]]; then
|
if is-true "${_ssh_agent_forwarding}" && [[ -n "$SSH_AUTH_SOCK" ]]; then
|
||||||
# Add a nifty symlink for screen/tmux if agent forwarding.
|
# Add a nifty symlink for screen/tmux if agent forwarding.
|
||||||
[[ -L "$SSH_AUTH_SOCK" ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USER-screen
|
[[ -L "$SSH_AUTH_SOCK" ]] || ln -sf "$SSH_AUTH_SOCK" /tmp/ssh-agent-$USER-screen
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Syntax Highlighting
|
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*
|
This module should be loaded *second to last*, where last is the *prompt*
|
||||||
module, unless used in conjuncture with the *history-substring-search* module
|
module, unless used in conjuncture with the *history-substring-search* module
|
||||||
|
@ -21,7 +21,7 @@ Settings
|
||||||
|
|
||||||
To enable highlighting for this module only, add the following line to *zshrc*:
|
To enable highlighting for this module only, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:syntax-highlighting' color 'yes'
|
zstyle ':prezto:module:syntax-highlighting' color 'yes'
|
||||||
|
|
||||||
### Highlighters
|
### Highlighters
|
||||||
|
|
||||||
|
@ -30,7 +30,7 @@ enables the *main*, *brackets*, and *cursor* highlighters by default.
|
||||||
|
|
||||||
To enable all highlighters, add the following to *zshrc*:
|
To enable all highlighters, add the following to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:syntax-highlighting' highlighters \
|
zstyle ':prezto:module:syntax-highlighting' highlighters \
|
||||||
'main' \
|
'main' \
|
||||||
'brackets' \
|
'brackets' \
|
||||||
'pattern' \
|
'pattern' \
|
||||||
|
@ -46,5 +46,5 @@ Authors
|
||||||
|
|
||||||
[1]: https://github.com/zsh-users/zsh-syntax-highlighting
|
[1]: https://github.com/zsh-users/zsh-syntax-highlighting
|
||||||
[2]: https://github.com/zsh-users/zsh-syntax-highlighting/tree/master/highlighters
|
[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,12 +1,12 @@
|
||||||
#
|
#
|
||||||
# Integrates zsh-syntax-highlighting into Oh My Zsh.
|
# Integrates zsh-syntax-highlighting into Prezto.
|
||||||
#
|
#
|
||||||
# Authors:
|
# Authors:
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
# Return if requirements are not found.
|
# Return if requirements are not found.
|
||||||
if ! zstyle -t ':omz:module:syntax-highlighting' color; then
|
if ! zstyle -t ':prezto:module:syntax-highlighting' color; then
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ fi
|
||||||
source "${0:h}/external/zsh-syntax-highlighting.zsh"
|
source "${0:h}/external/zsh-syntax-highlighting.zsh"
|
||||||
|
|
||||||
# Set the highlighters.
|
# Set the highlighters.
|
||||||
zstyle -a ':omz:module:syntax-highlighting' highlighters 'ZSH_HIGHLIGHT_HIGHLIGHTERS'
|
zstyle -a ':prezto:module:syntax-highlighting' highlighters 'ZSH_HIGHLIGHT_HIGHLIGHTERS'
|
||||||
if (( ${#ZSH_HIGHLIGHT_HIGHLIGHTERS[@]} == 0 )); then
|
if (( ${#ZSH_HIGHLIGHT_HIGHLIGHTERS[@]} == 0 )); then
|
||||||
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets cursor)
|
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets cursor)
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -11,7 +11,7 @@ Settings
|
||||||
To auto set the terminal window and tab titles with the current command or
|
To auto set the terminal window and tab titles with the current command or
|
||||||
directory, add the following to *zshrc*:
|
directory, add the following to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:terminal' auto-title 'yes'
|
zstyle ':prezto:module:terminal' auto-title 'yes'
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
|
@ -21,5 +21,5 @@ Authors
|
||||||
- [James Cox](https://github.com/imajes)
|
- [James Cox](https://github.com/imajes)
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [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
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ autoload -Uz add-zsh-hook
|
||||||
|
|
||||||
# Sets the tab and window titles before the prompt is displayed.
|
# Sets the tab and window titles before the prompt is displayed.
|
||||||
function set-title-precmd {
|
function set-title-precmd {
|
||||||
if zstyle -t ':omz:module:terminal' auto-title; then
|
if zstyle -t ':prezto:module:terminal' auto-title; then
|
||||||
if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then
|
if [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]]; then
|
||||||
# Set the current working directory in Apple Terminal.
|
# Set the current working directory in Apple Terminal.
|
||||||
printf '\e]7;%s\a' "file://$HOST${PWD// /%20}"
|
printf '\e]7;%s\a' "file://$HOST${PWD// /%20}"
|
||||||
|
@ -95,7 +95,7 @@ add-zsh-hook precmd set-title-precmd
|
||||||
|
|
||||||
# Sets the tab and window titles before command execution.
|
# Sets the tab and window titles before command execution.
|
||||||
function set-title-preexec {
|
function set-title-preexec {
|
||||||
if zstyle -t ':omz:module:terminal' auto-title; then
|
if zstyle -t ':prezto:module:terminal' auto-title; then
|
||||||
if [[ "$TERM_PROGRAM" != 'Apple_Terminal' ]]; then
|
if [[ "$TERM_PROGRAM" != 'Apple_Terminal' ]]; then
|
||||||
set-title-by-command "$2"
|
set-title-by-command "$2"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -12,10 +12,10 @@ Starts a tmux session automatically when Zsh is launched.
|
||||||
|
|
||||||
To enable this feature, add the following line to *zshrc*:
|
To enable this feature, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:tmux' auto-start 'yes'
|
zstyle ':prezto:module:tmux' auto-start 'yes'
|
||||||
|
|
||||||
It will create a background session named _#OMZ_ and attach every new shell to
|
It will create a background session named _#Prezto_ and attach every new shell
|
||||||
it.
|
to it.
|
||||||
|
|
||||||
To avoid keeping open sessions, this module sets `destroy-unattached off` on
|
To avoid keeping open sessions, this module sets `destroy-unattached off` on
|
||||||
the background session and `destroy-unattached on` on every other session
|
the background session and `destroy-unattached on` on every other session
|
||||||
|
@ -38,7 +38,7 @@ following to *tmux.conf*:
|
||||||
set-option -g default-command "reattach-to-user-namespace -l $SHELL -l"
|
set-option -g default-command "reattach-to-user-namespace -l $SHELL -l"
|
||||||
|
|
||||||
Furthermore, tmux is known to cause **kernel panics** on Mac OS X. A discussion
|
Furthermore, tmux is known to cause **kernel panics** on Mac OS X. A discussion
|
||||||
about this and OMZ has already been [opened][2].
|
about this and Prezto has already been [opened][2].
|
||||||
|
|
||||||
Authors
|
Authors
|
||||||
-------
|
-------
|
||||||
|
@ -52,5 +52,5 @@ Authors
|
||||||
[2]: http://git.io/jkPqHg
|
[2]: http://git.io/jkPqHg
|
||||||
[3]: ChrisJohnsen/tmux-MacOSX-pasteboard
|
[3]: ChrisJohnsen/tmux-MacOSX-pasteboard
|
||||||
[4]: mxcl/homebrew
|
[4]: mxcl/homebrew
|
||||||
[5]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
[5]: https://github.com/sorin-ionescu/prezto/issues
|
||||||
|
|
||||||
|
|
|
@ -15,8 +15,8 @@ fi
|
||||||
# Auto Start
|
# Auto Start
|
||||||
#
|
#
|
||||||
|
|
||||||
if [[ -z "$TMUX" ]] && zstyle -t ':omz:module:tmux' auto-start; then
|
if [[ -z "$TMUX" ]] && zstyle -t ':prezto:module:tmux' auto-start; then
|
||||||
tmux_session='#OMZ'
|
tmux_session='#Prezto'
|
||||||
|
|
||||||
if ! tmux has-session -t "$tmux_session" 2> /dev/null; then
|
if ! tmux has-session -t "$tmux_session" 2> /dev/null; then
|
||||||
# Disable the destruction of unattached sessions globally.
|
# Disable the destruction of unattached sessions globally.
|
||||||
|
|
|
@ -17,5 +17,5 @@ Authors
|
||||||
|
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [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
|
||||||
|
|
||||||
|
|
|
@ -14,19 +14,19 @@ commands.
|
||||||
To disable `ls` color, add the following line to *zshrc*; when coloring is
|
To disable `ls` color, add the following line to *zshrc*; when coloring is
|
||||||
disabled, type indicators (\*, /, =>, @, =, |, %) will be appended to entries.
|
disabled, type indicators (\*, /, =>, @, =, |, %) will be appended to entries.
|
||||||
|
|
||||||
zstyle ':omz:module:utility:ls' color 'no'
|
zstyle ':prezto:module:utility:ls' color 'no'
|
||||||
|
|
||||||
To disable `diff` highlighting, add the following line to *zshrc*:
|
To disable `diff` highlighting, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:utility:diff' color 'no'
|
zstyle ':prezto:module:utility:diff' color 'no'
|
||||||
|
|
||||||
To disable `wdiff` highlighting, add the following line to *zshrc*:
|
To disable `wdiff` highlighting, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:utility:wdiff' color 'no'
|
zstyle ':prezto:module:utility:wdiff' color 'no'
|
||||||
|
|
||||||
To disable `make` highlighting, add the following line to *zshrc*:
|
To disable `make` highlighting, add the following line to *zshrc*:
|
||||||
|
|
||||||
zstyle ':omz:module:utility:make' color 'no'
|
zstyle ':prezto:module:utility:make' color 'no'
|
||||||
|
|
||||||
Aliases
|
Aliases
|
||||||
-------
|
-------
|
||||||
|
@ -154,5 +154,5 @@ Authors
|
||||||
- [Suraj N. Kurapati](https://github.com/sunaku)
|
- [Suraj N. Kurapati](https://github.com/sunaku)
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [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
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
function diff {
|
function diff {
|
||||||
if zstyle -t ':omz:module:utility:diff' color; then
|
if zstyle -t ':prezto:module:utility:diff' color; then
|
||||||
if (( $+commands[colordiff] )); then
|
if (( $+commands[colordiff] )); then
|
||||||
command diff --unified "$@" | colordiff --difftype diffu
|
command diff --unified "$@" | colordiff --difftype diffu
|
||||||
elif (( $+commands[git] )); then
|
elif (( $+commands[git] )); then
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
function make {
|
function make {
|
||||||
if zstyle -t ':omz:module:utility:make' color; then
|
if zstyle -t ':prezto:module:utility:make' color; then
|
||||||
if (( $+commands[colormake] )); then
|
if (( $+commands[colormake] )); then
|
||||||
colormake "$@"
|
colormake "$@"
|
||||||
else
|
else
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
function wdiff {
|
function wdiff {
|
||||||
if zstyle -t ':omz:module:utility:wdiff' color; then
|
if zstyle -t ':prezto:module:utility:wdiff' color; then
|
||||||
if (( $+commands[wdiff] )); then
|
if (( $+commands[wdiff] )); then
|
||||||
command wdiff \
|
command wdiff \
|
||||||
--avoid-wraps \
|
--avoid-wraps \
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
# Load dependencies.
|
# Load dependencies.
|
||||||
omodload 'spectrum'
|
pmodload 'spectrum'
|
||||||
|
|
||||||
# Correct commands.
|
# Correct commands.
|
||||||
setopt CORRECT
|
setopt CORRECT
|
||||||
|
@ -63,7 +63,7 @@ if is-callable 'dircolors'; then
|
||||||
# GNU Core Utilities
|
# GNU Core Utilities
|
||||||
alias ls='ls --group-directories-first'
|
alias ls='ls --group-directories-first'
|
||||||
|
|
||||||
if zstyle -t ':omz:module:utility:ls' color; then
|
if zstyle -t ':prezto:module:utility:ls' color; then
|
||||||
if [[ -s "$HOME/.dir_colors" ]]; then
|
if [[ -s "$HOME/.dir_colors" ]]; then
|
||||||
eval "$(dircolors "$HOME/.dir_colors")"
|
eval "$(dircolors "$HOME/.dir_colors")"
|
||||||
else
|
else
|
||||||
|
@ -75,7 +75,7 @@ if is-callable 'dircolors'; then
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# BSD Core Utilities
|
# BSD Core Utilities
|
||||||
if zstyle -t ':omz:module:utility:ls' color; then
|
if zstyle -t ':prezto:module:utility:ls' color; then
|
||||||
export LSCOLORS="exfxcxdxbxegedabagacad"
|
export LSCOLORS="exfxcxdxbxegedabagacad"
|
||||||
alias ls="ls -G"
|
alias ls="ls -G"
|
||||||
else
|
else
|
||||||
|
|
|
@ -33,5 +33,5 @@ Authors
|
||||||
|
|
||||||
[1]: http://gsd.di.uminho.pt/jpo/software/wakeonlan/
|
[1]: http://gsd.di.uminho.pt/jpo/software/wakeonlan/
|
||||||
[2]: http://man.cx/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)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: http://yum.baseurl.org
|
[1]: http://yum.baseurl.org
|
||||||
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
[2]: https://github.com/sorin-ionescu/prezto/issues
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
Z
|
Z
|
||||||
=
|
=
|
||||||
|
|
||||||
Integrates [z][1] into Oh My Zsh, which maintains a frequently used directory
|
Integrates [z][1] into Prezto, which maintains a frequently used directory
|
||||||
list for fast directory changes.
|
list for fast directory changes.
|
||||||
|
|
||||||
Aliases
|
Aliases
|
||||||
|
@ -17,5 +17,5 @@ Authors
|
||||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
[1]: https://github.com/rupa/z
|
[1]: https://github.com/rupa/z
|
||||||
[2]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
[2]: 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,
|
This file is sourced by interactive shells. It should define aliases,
|
||||||
functions, shell options, and key bindings.
|
functions, shell options, and key bindings.
|
||||||
|
|
||||||
This is the main Oh My Zsh configuration file.
|
This is the main Prezto configuration file.
|
||||||
|
|
||||||
### zlogin
|
### zlogin
|
||||||
|
|
||||||
|
@ -71,5 +71,5 @@ Authors
|
||||||
[1]: http://www.kornshell.com
|
[1]: http://www.kornshell.com
|
||||||
[2]: http://en.wikipedia.org/wiki/Fortune_(Unix)
|
[2]: http://en.wikipedia.org/wiki/Fortune_(Unix)
|
||||||
[3]: http://www.manpagez.com/man/1/msgs
|
[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,9 @@
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
# Set the path to Oh My Zsh.
|
# Set the path to Prezto.
|
||||||
export OMZ="$HOME/.oh-my-zsh"
|
export ZDOTDIR="${ZDOTDIR:-$HOME}"
|
||||||
|
export PREZTO="$ZDOTDIR/.zprezto"
|
||||||
|
|
||||||
#
|
#
|
||||||
# Browser
|
# Browser
|
||||||
|
|
|
@ -1,34 +1,34 @@
|
||||||
#
|
#
|
||||||
# Sets Oh My Zsh options.
|
# Sets Prezto options.
|
||||||
#
|
#
|
||||||
# Authors:
|
# Authors:
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
# Set the key mapping style to 'emacs' or 'vi'.
|
# Set the key mapping style to 'emacs' or 'vi'.
|
||||||
zstyle ':omz:module:editor' keymap 'emacs'
|
zstyle ':prezto:module:editor' keymap 'emacs'
|
||||||
|
|
||||||
# Auto convert .... to ../..
|
# Auto convert .... to ../..
|
||||||
zstyle ':omz:module:editor' dot-expansion 'no'
|
zstyle ':prezto:module:editor' dot-expansion 'no'
|
||||||
|
|
||||||
# Set case-sensitivity for completion, history lookup, etc.
|
# Set case-sensitivity for completion, history lookup, etc.
|
||||||
zstyle ':omz:*:*' case-sensitive 'no'
|
zstyle ':prezto:*:*' case-sensitive 'no'
|
||||||
|
|
||||||
# Color output (auto set to 'no' on dumb terminals).
|
# Color output (auto set to 'no' on dumb terminals).
|
||||||
zstyle ':omz:*:*' color 'yes'
|
zstyle ':prezto:*:*' color 'yes'
|
||||||
|
|
||||||
# Auto set the tab and window titles.
|
# Auto set the tab and window titles.
|
||||||
zstyle ':omz:module:terminal' auto-title 'yes'
|
zstyle ':prezto:module:terminal' auto-title 'yes'
|
||||||
|
|
||||||
# Set the Zsh modules to load (man zshmodules).
|
# Set the Zsh modules to load (man zshmodules).
|
||||||
# zstyle ':omz:load' zmodule 'attr' 'stat'
|
# zstyle ':prezto:load' zmodule 'attr' 'stat'
|
||||||
|
|
||||||
# Set the Zsh functions to load (man zshcontrib).
|
# Set the Zsh functions to load (man zshcontrib).
|
||||||
# zstyle ':omz:load' zfunction 'zargs' 'zmv'
|
# zstyle ':prezto: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.
|
# The order matters.
|
||||||
zstyle ':omz:load' omodule \
|
zstyle ':prezto:load' pmodule \
|
||||||
'environment' \
|
'environment' \
|
||||||
'terminal' \
|
'terminal' \
|
||||||
'editor' \
|
'editor' \
|
||||||
|
@ -42,10 +42,10 @@ zstyle ':omz:load' omodule \
|
||||||
# Set the prompt theme to load.
|
# Set the prompt theme to load.
|
||||||
# Setting it to 'random' loads a random theme.
|
# Setting it to 'random' loads a random theme.
|
||||||
# Auto set to 'off' on dumb terminals.
|
# Auto set to 'off' on dumb terminals.
|
||||||
zstyle ':omz:module:prompt' theme 'sorin'
|
zstyle ':prezto:module:prompt' theme 'sorin'
|
||||||
|
|
||||||
# This will make you shout: OH MY ZSHELL!
|
# Source Prezto.
|
||||||
source "$OMZ/init.zsh"
|
source "$PREZTO/init.zsh"
|
||||||
|
|
||||||
# Customize to your needs...
|
# Customize to your needs...
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue