commit
c6eec8b985
@ -0,0 +1,41 @@
|
|||||||
|
Archive
|
||||||
|
=======
|
||||||
|
|
||||||
|
Provides functions to extract and list popular archive formats.
|
||||||
|
|
||||||
|
Functions
|
||||||
|
---------
|
||||||
|
|
||||||
|
- `extract` extracts the contents of one or more archives.
|
||||||
|
- `ls-archive` lists the contents of one or more archives.
|
||||||
|
|
||||||
|
Supported Formats
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
The following archive formats are supported when the required utilities are
|
||||||
|
installed:
|
||||||
|
|
||||||
|
- *.tar.gz*, *.tgz* require `tar`.
|
||||||
|
- *.tar.bz2*, *.tbz* require `tar`.
|
||||||
|
- *.tar.xz*, *.txz* require `tar` with *xz* support.
|
||||||
|
- *.tar.zma*, *.tlz* require `tar` with *lzma* support.
|
||||||
|
- *.tar* requires `tar`.
|
||||||
|
- *.gz* requires `gunzip`.
|
||||||
|
- *.bz2* requires `bunzip2`.
|
||||||
|
- *.xz* requires `unxz`.
|
||||||
|
- *.lzma* requires `unlzma`.
|
||||||
|
- *.Z* requires `uncompress`.
|
||||||
|
- *.zip* requires `unzip`.
|
||||||
|
- *.rar* requires `unrar`.
|
||||||
|
- *.7z* requires `7za`.
|
||||||
|
- *.deb* requires `ar`, `tar`.
|
||||||
|
|
||||||
|
Authors
|
||||||
|
-------
|
||||||
|
|
||||||
|
*The authors of this module should be contacted via the [issue tracker][1].*
|
||||||
|
|
||||||
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
|
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
Environment
|
||||||
|
===========
|
||||||
|
|
||||||
|
Sets general shell options and defines environment variables.
|
||||||
|
|
||||||
|
This module must be loaded first.
|
||||||
|
|
||||||
|
Environment Variables
|
||||||
|
---------------------
|
||||||
|
|
||||||
|
Contributors
|
||||||
|
------------
|
||||||
|
|
||||||
|
This module **MUST NOT** rely on any command not built in Zsh.
|
||||||
|
|
||||||
|
Non-interactive environment variables should be defined in *zshenv*.
|
||||||
|
|
||||||
|
Authors
|
||||||
|
-------
|
||||||
|
|
||||||
|
*The authors of this module should be contacted via the [issue tracker][1].*
|
||||||
|
|
||||||
|
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||||
|
|
||||||
|
[1]: https://github.com/sorin-ionescu/oh-my-zsh/issues
|
||||||
|
|
@ -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. It 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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -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
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
#
|
||||||
|
# Executes commands at login pre-zshrc.
|
||||||
|
#
|
||||||
|
# Authors:
|
||||||
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
|
#
|
||||||
|
|
@ -0,0 +1,78 @@
|
|||||||
|
#
|
||||||
|
# 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 (Default)
|
||||||
|
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
|
||||||
|
|
Loading…
Reference in new issue