1
0
Fork 0

[Fix #253] Move Prezto settings into their own file

pull/265/head
Sorin Ionescu 12 years ago
parent d041e44cfe
commit cc7e43b242

@ -22,8 +22,9 @@ version is 4.3.10.
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
ln -s "$rcfile" "$ZDOTDIR/.$rcfile:t"
setopt EXTENDED_GLOB
for rcfile in "${ZDOTDIR:-$HOME}"/.zprezto/runcoms/^README.md(.N); do
ln -s "$rcfile" "$ZDOTDIR/.${rcfile:t}"
done
4. Set Zsh as your default shell:
@ -66,15 +67,15 @@ accompanying README files to learn of what is available.
### Modules
1. Browse */modules* to see what is available.
2. Load the modules you need in *~/.zshrc* then open a new Zsh terminal window
or tab.
2. Load the modules you need in *~/.zpreztorc* then open a new Zsh terminal
window or tab.
### Themes
1. For a list of themes, type `prompt -l`.
2. To preview a theme, type `prompt -p name`.
3. Load the theme you like in *~/.zshrc* then open a new Zsh terminal window
or tab.
3. Load the theme you like in *~/.zpreztorc* then open a new Zsh terminal
window or tab.
![sorin theme][2]

@ -18,6 +18,11 @@ if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then
source "${ZDOTDIR:-$HOME}/.zpreztorc"
fi
# Source the Prezto configuration file.
if [[ -s "${ZDOTDIR:-$HOME}/.zpreztorc" ]]; then
source "${ZDOTDIR:-$HOME}/.zpreztorc"
fi
# Disable color and theme in dumb terminals.
if [[ "$TERM" == 'dumb' ]]; then
zstyle ':prezto:*:*' color 'no'
@ -37,7 +42,7 @@ unset zfunction{s,}
# Source files (the order matters).
source "${0:h}/helper.zsh"
# Source Prezto modules defined in ~/.zshrc.
# Load Prezto modules.
zstyle -a ':prezto:load' pmodule 'pmodules'
pmodload "$pmodules[@]"
unset pmodules

@ -5,12 +5,13 @@
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Usage:
# To enable key bindings, add the following to zshrc, and replace 'map' with
# 'emacs' or 'vi.
# To enable key bindings, add the following to zpreztorc, and replace 'map'
# with 'emacs' or 'vi.
#
# 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
# zpreztorc.
#
# zstyle ':prezto:module:editor' dot-expansion 'yes'
#

@ -17,7 +17,7 @@ Settings
### Prefix
To use a different prefix, add the following to *zshrc*, and replace 'g' with
To use a different prefix, add the following to *zpreztorc*, and replace 'g' with
the desired prefix:
zstyle ':prezto:module:gnu-utility' prefix 'g'

@ -22,7 +22,7 @@ Settings
### Case Sensitivity
To enable case-sensitivity for this module only, add the following line to
*zshrc*:
*zpreztorc*:
zstyle ':prezto:module:history-substring-search' case-sensitive 'yes'
@ -31,7 +31,8 @@ To enable case-sensitivity for this module only, add the following line to
If colors are enabled, *history-substring-search* will automatically highlight
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
*zpreztorc*:
zstyle ':prezto:module:history-substring-search' color 'yes'

@ -8,14 +8,14 @@ Settings
--------
To enable a Pacman frontend, for example, [Yaourt][2], add the following line to
*zshrc*:
*zpreztorc*:
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 *zpreztorc*, you may disable it for certain
commands.
To disable `yaourt` highlighting, add the following line to *zshrc*:
To disable `yaourt` highlighting, add the following line to *zpreztorc*:
zstyle ':prezto:module:pacman:yaourt' color 'no'

@ -6,7 +6,7 @@ Loads prompt [themes][1].
Settings
--------
To select a prompt theme, add the following to *zshrc*, and replace **name**
To select a prompt theme, add the following to *zpreztorc*, and replace **name**
with the name of the theme you wish to load. Setting it to **random** will load
a random theme.

@ -10,7 +10,7 @@ Settings
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 *zpreztorc*:
zstyle ':prezto:module:screen' auto-start 'yes'

@ -8,13 +8,13 @@ Settings
### Agent Forwarding
To enable ssh-agent forwarding, add the following line to *zshrc*:
To enable ssh-agent forwarding, add the following line to *zpreztorc*:
zstyle ':prezto:module:ssh-agent' forwarding 'yes'
### Identities
To load multiple identities, add the following line to *zshrc*:
To load multiple identities, add the following line to *zpreztorc*:
zstyle ':prezto:module:ssh-agent' identities 'id_rsa' 'id_rsa2' 'id_github'

@ -19,7 +19,8 @@ Settings
### Highlighting
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
*zpreztorc*:
zstyle ':prezto:module:syntax-highlighting' color 'yes'
@ -28,7 +29,7 @@ To enable highlighting for this module only, add the following line to *zshrc*:
Syntax highlighting is accomplished by pluggable [highlighters][2]. This module
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 *zpreztorc*:
zstyle ':prezto:module:syntax-highlighting' highlighters \
'main' \

@ -9,7 +9,7 @@ Settings
### Auto-Title
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 *zpreztorc*:
zstyle ':prezto:module:terminal' auto-title 'yes'

@ -10,7 +10,7 @@ Settings
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 *zpreztorc*:
zstyle ':prezto:module:tmux' auto-start 'yes'

@ -8,23 +8,23 @@ Settings
### Highlighting
If you have enabled color globally in *zshrc*, you may disable it for certain
If you have enabled color globally in *zpreztorc*, you may disable it for certain
commands.
To disable `ls` color, add the following line to *zshrc*; when coloring is
To disable `ls` color, add the following line to *zpreztorc*; when coloring is
disabled, type indicators (\*, /, =>, @, =, |, %) will be appended to entries.
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 *zpreztorc*:
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 *zpreztorc*:
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 *zpreztorc*:
zstyle ':prezto:module:utility:make' color 'no'

@ -1,8 +1,10 @@
Zsh Configuration Files
=======================
Configuration Files
===================
Zsh has several system-wide and user-local configuration files.
Prezto has one user-local configuration file.
System-wide configuration files are installation-dependent but are installed
in */etc* by default.
@ -22,10 +24,11 @@ The configuration files are read in the following order:
04. ~/.zprofile
05. /etc/zshrc
06. ~/.zshrc
07. /etc/zlogin
08. ~/.zlogin
09. ~/.zlogout
10. /etc/zlogout
07. ~/.zpreztorc
08. /etc/zlogin
09. ~/.zlogin
10. ~/.zlogout
11. /etc/zlogout
### zshenv
@ -45,7 +48,9 @@ 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 Prezto configuration file.
## zpreztorc
This file configures Prezto.
### zlogin

@ -0,0 +1,46 @@
#
# Sets Prezto options.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Set the key mapping style to 'emacs' or 'vi'.
zstyle ':prezto:module:editor' keymap 'emacs'
# Auto convert .... to ../..
zstyle ':prezto:module:editor' dot-expansion 'no'
# Set case-sensitivity for completion, history lookup, etc.
zstyle ':prezto:*:*' case-sensitive 'no'
# Color output (auto set to 'no' on dumb terminals).
zstyle ':prezto:*:*' color 'yes'
# Auto set the tab and window titles.
zstyle ':prezto:module:terminal' auto-title 'yes'
# Set the Zsh modules to load (man zshmodules).
# zstyle ':prezto:load' zmodule 'attr' 'stat'
# Set the Zsh functions to load (man zshcontrib).
# zstyle ':prezto:load' zfunction 'zargs' 'zmv'
# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
'environment' \
'terminal' \
'editor' \
'history' \
'directory' \
'spectrum' \
'utility' \
'completion' \
'prompt'
# Set the prompt theme to load.
# Setting it to 'random' loads a random theme.
# Auto set to 'off' on dumb terminals.
zstyle ':prezto:module:prompt' theme 'sorin'

@ -1,49 +1,10 @@
#
# Sets Prezto options.
# Executes commands at the start of an interactive session.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Set the key mapping style to 'emacs' or 'vi'.
zstyle ':prezto:module:editor' keymap 'emacs'
# Auto convert .... to ../..
zstyle ':prezto:module:editor' dot-expansion 'no'
# Set case-sensitivity for completion, history lookup, etc.
zstyle ':prezto:*:*' case-sensitive 'no'
# Color output (auto set to 'no' on dumb terminals).
zstyle ':prezto:*:*' color 'yes'
# Auto set the tab and window titles.
zstyle ':prezto:module:terminal' auto-title 'yes'
# Set the Zsh modules to load (man zshmodules).
# zstyle ':prezto:load' zmodule 'attr' 'stat'
# Set the Zsh functions to load (man zshcontrib).
# zstyle ':prezto:load' zfunction 'zargs' 'zmv'
# Set the Prezto modules to load (browse modules).
# The order matters.
zstyle ':prezto:load' pmodule \
'environment' \
'terminal' \
'editor' \
'history' \
'directory' \
'spectrum' \
'utility' \
'completion' \
'prompt'
# Set the prompt theme to load.
# Setting it to 'random' loads a random theme.
# Auto set to 'off' on dumb terminals.
zstyle ':prezto:module:prompt' theme 'sorin'
# Source Prezto.
if [[ -s "${ZDOTDIR:-$HOME}/.zprezto/init.zsh" ]]; then
source "${ZDOTDIR:-$HOME}/.zprezto/init.zsh"

Loading…
Cancel
Save