mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-02 21:19:25 +00:00
Rename templates to runcoms
This commit is contained in:
75
runcoms/README.md
Normal file
75
runcoms/README.md
Normal file
@ -0,0 +1,75 @@
|
||||
Zsh Configuration Files
|
||||
=======================
|
||||
|
||||
Zsh has several system-wide and user-local configuration files.
|
||||
|
||||
System-wide configuration files are installation-dependent but are installed
|
||||
in */etc* by default.
|
||||
|
||||
User-local configuration files have the same name as their global counterparts
|
||||
but are prefixed with a dot (hidden). Zsh looks for these files in the path
|
||||
stored in the `$ZDOTDIR` environmental variable. However, if said variable is
|
||||
not defined, Zsh will use the user's home directory.
|
||||
|
||||
File Descriptions
|
||||
-----------------
|
||||
|
||||
The configuration files are read in the following order:
|
||||
|
||||
01. /etc/zshenv
|
||||
02. ~/.zshenv
|
||||
03. /etc/zprofile
|
||||
04. ~/.zprofile
|
||||
05. /etc/zshrc
|
||||
06. ~/.zshrc
|
||||
07. /etc/zlogin
|
||||
08. ~/.zlogin
|
||||
09. ~/.zlogout
|
||||
10. /etc/zlogout
|
||||
|
||||
### zshenv
|
||||
|
||||
This file is sourced by all instances of Zsh, and thus, it should be kept as
|
||||
small as possible and should only define environment variables.
|
||||
|
||||
### zprofile
|
||||
|
||||
This file is similar to zlogin, but it is sourced before zshrc. It was added
|
||||
for [KornShell][1] fans. See the description of zlogin bellow for what it may
|
||||
contain.
|
||||
|
||||
zprofile and zlogin are not meant to be used concurrently but can be done so.
|
||||
|
||||
### zshrc
|
||||
|
||||
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.
|
||||
|
||||
### zlogin
|
||||
|
||||
This file is sourced by login shells after zshrc, and thus, it should contain
|
||||
commands that need to execute at login. It is usually used for messages such as
|
||||
[fortune][2], [msgs][3], or for the creation of files.
|
||||
|
||||
This is not the file to define aliases, functions, shell options, and key
|
||||
bindings. It should not change the shell environment.
|
||||
|
||||
### zlogout
|
||||
|
||||
This file is sourced by login shells during logout. It should be used for
|
||||
displaying messages and the deletion of files.
|
||||
|
||||
Authors
|
||||
-------
|
||||
|
||||
*The authors of these files should be contacted via the [issue tracker][4].*
|
||||
|
||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||
|
||||
[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
|
||||
|
29
runcoms/zlogin
Normal file
29
runcoms/zlogin
Normal file
@ -0,0 +1,29 @@
|
||||
#
|
||||
# Executes commands at login post-zshrc.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# Execute code that does not affect the current session in the background.
|
||||
{
|
||||
# Compile the completion dump to increase startup speed.
|
||||
dump_file="$HOME/.zcompdump"
|
||||
if [[ "$dump_file" -nt "${dump_file}.zwc" || ! -s "${dump_file}.zwc" ]]; then
|
||||
zcompile "$dump_file"
|
||||
fi
|
||||
|
||||
# Set environment variables for launchd processes.
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
for env_var in PATH MANPATH; do
|
||||
launchctl setenv "$env_var" "${(P)env_var}"
|
||||
done
|
||||
fi
|
||||
} &!
|
||||
|
||||
# Print a random, hopefully interesting, adage.
|
||||
if (( $+commands[fortune] )); then
|
||||
fortune -a
|
||||
print
|
||||
fi
|
||||
|
14
runcoms/zlogout
Normal file
14
runcoms/zlogout
Normal file
@ -0,0 +1,14 @@
|
||||
#
|
||||
# Executes commands at logout.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# Print the message.
|
||||
cat <<-EOF
|
||||
|
||||
Thank you. Come again!
|
||||
-- Dr. Apu Nahasapeemapetilon
|
||||
EOF
|
||||
|
7
runcoms/zprofile
Normal file
7
runcoms/zprofile
Normal file
@ -0,0 +1,7 @@
|
||||
#
|
||||
# Executes commands at login pre-zshrc.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
92
runcoms/zshenv
Normal file
92
runcoms/zshenv
Normal file
@ -0,0 +1,92 @@
|
||||
#
|
||||
# Defines environment variables.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# Set the path to Oh My Zsh.
|
||||
export OMZ="$HOME/.oh-my-zsh"
|
||||
|
||||
#
|
||||
# Paths
|
||||
#
|
||||
|
||||
typeset -gU cdpath fpath mailpath manpath path
|
||||
typeset -gUT INFOPATH infopath
|
||||
|
||||
# Set the the list of directories that cd searches.
|
||||
# cdpath=(
|
||||
# $cdpath
|
||||
# )
|
||||
|
||||
# Set the list of directories that info searches for manuals.
|
||||
infopath=(
|
||||
/usr/local/share/info
|
||||
/usr/share/info
|
||||
$infopath
|
||||
)
|
||||
|
||||
# Set the list of directories that man searches for manuals.
|
||||
manpath=(
|
||||
/usr/local/share/man
|
||||
/usr/share/man
|
||||
$manpath
|
||||
)
|
||||
|
||||
for path_file in /etc/manpaths.d/*(.N); do
|
||||
manpath+=($(<$path_file))
|
||||
done
|
||||
unset path_file
|
||||
|
||||
# Set the list of directories that Zsh searches for programs.
|
||||
path=(
|
||||
/usr/local/{bin,sbin}
|
||||
/usr/{bin,sbin}
|
||||
/{bin,sbin}
|
||||
$path
|
||||
)
|
||||
|
||||
for path_file in /etc/paths.d/*(.N); do
|
||||
path+=($(<$path_file))
|
||||
done
|
||||
unset path_file
|
||||
|
||||
#
|
||||
# Language
|
||||
#
|
||||
|
||||
if [[ -z "$LANG" ]]; then
|
||||
eval "$(locale)"
|
||||
fi
|
||||
|
||||
#
|
||||
# Editors
|
||||
#
|
||||
|
||||
export EDITOR='nano'
|
||||
export VISUAL='nano'
|
||||
export PAGER='less'
|
||||
|
||||
#
|
||||
# Browser
|
||||
#
|
||||
|
||||
if [[ "$OSTYPE" == darwin* ]]; then
|
||||
export BROWSER='open'
|
||||
fi
|
||||
|
||||
#
|
||||
# Less
|
||||
#
|
||||
|
||||
# Set the default Less options.
|
||||
# Mouse-wheel scrolling has been disabled by -X (disable screen clearing).
|
||||
# Remove -X and -F (exit if the content fits on one screen) to enable it.
|
||||
export LESS='-F -g -i -M -R -S -w -X -z-4'
|
||||
|
||||
# Set the Less input preprocessor.
|
||||
if (( $+commands[lesspipe.sh] )); then
|
||||
export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-'
|
||||
fi
|
||||
|
51
runcoms/zshrc
Normal file
51
runcoms/zshrc
Normal file
@ -0,0 +1,51 @@
|
||||
#
|
||||
# Sets Oh My Zsh options.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# Set the key mapping style to 'emacs' or 'vi'.
|
||||
zstyle ':omz:module:editor' keymap 'emacs'
|
||||
|
||||
# Auto convert .... to ../..
|
||||
zstyle ':omz:module:editor' dot-expansion 'no'
|
||||
|
||||
# Set case-sensitivity for completion, history lookup, etc.
|
||||
zstyle ':omz:*:*' case-sensitive 'no'
|
||||
|
||||
# Color output (auto set to 'no' on dumb terminals).
|
||||
zstyle ':omz:*:*' color 'yes'
|
||||
|
||||
# Auto set the tab and window titles.
|
||||
zstyle ':omz:module:terminal' auto-title 'yes'
|
||||
|
||||
# Set the Zsh modules to load (man zshmodules).
|
||||
# zstyle ':omz:load' zmodule 'attr' 'stat'
|
||||
|
||||
# Set the Zsh functions to load (man zshcontrib).
|
||||
# zstyle ':omz:load' zfunction 'zargs' 'zmv'
|
||||
|
||||
# Set the Oh My Zsh modules to load (browse modules).
|
||||
# The order matters.
|
||||
zstyle ':omz:load' omodule \
|
||||
'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 ':omz:module:prompt' theme 'sorin'
|
||||
|
||||
# This will make you shout: OH MY ZSHELL!
|
||||
source "$OMZ/init.zsh"
|
||||
|
||||
# Customize to your needs...
|
||||
|
Reference in New Issue
Block a user