From 7731be2f5e545b557a520fa4c2c3e9c176ac31b9 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 31 May 2012 17:33:59 -0400 Subject: [PATCH 01/15] Fix diction in a comment --- modules/prompt/init.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/prompt/init.zsh b/modules/prompt/init.zsh index 973dd711..a92eb233 100644 --- a/modules/prompt/init.zsh +++ b/modules/prompt/init.zsh @@ -5,7 +5,7 @@ # Sorin Ionescu # -# Load and run the prompt theming system. +# Load and execute the prompt theming system. autoload -Uz promptinit && promptinit # Load the prompt theme. From bdaba6a714ec666dce4425fced7cb1e27e50175a Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 22 May 2012 12:49:45 -0400 Subject: [PATCH 02/15] [#171] Add templates and README for all rc files --- templates/README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++ templates/zlogin | 13 ++++++++ templates/zlogout | 14 +++++++++ templates/zprofile | 7 +++++ templates/zshenv | 7 +++++ 5 files changed, 116 insertions(+) create mode 100644 templates/README.md create mode 100644 templates/zlogin create mode 100644 templates/zlogout create mode 100644 templates/zprofile create mode 100644 templates/zshenv diff --git a/templates/README.md b/templates/README.md new file mode 100644 index 00000000..88f16436 --- /dev/null +++ b/templates/README.md @@ -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 + diff --git a/templates/zlogin b/templates/zlogin new file mode 100644 index 00000000..b13b6116 --- /dev/null +++ b/templates/zlogin @@ -0,0 +1,13 @@ +# +# Executes commands at login post-zshrc. +# +# Authors: +# Sorin Ionescu +# + +# Print a random, hopefully interesting, adage. +if (( $+commands[fortune] )); then + fortune -a + print +fi + diff --git a/templates/zlogout b/templates/zlogout new file mode 100644 index 00000000..d898fec1 --- /dev/null +++ b/templates/zlogout @@ -0,0 +1,14 @@ +# +# Executes commands at logout. +# +# Authors: +# Sorin Ionescu +# + +# Print the message. +cat <<-EOF + +Thank you. Come again! + -- Dr. Apu Nahasapeemapetilon +EOF + diff --git a/templates/zprofile b/templates/zprofile new file mode 100644 index 00000000..2a3d07e6 --- /dev/null +++ b/templates/zprofile @@ -0,0 +1,7 @@ +# +# Executes commands at login pre-zshrc. +# +# Authors: +# Sorin Ionescu +# + diff --git a/templates/zshenv b/templates/zshenv new file mode 100644 index 00000000..89f92755 --- /dev/null +++ b/templates/zshenv @@ -0,0 +1,7 @@ +# +# Defines environment variables. +# +# Authors: +# Sorin Ionescu +# + From 7a4433e92c0d7d11f3d8db121c9ffb8f057be1b3 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Tue, 22 May 2012 13:07:33 -0400 Subject: [PATCH 03/15] [#171] Move environment variables into zshenv --- modules/environment/init.zsh | 66 ---------------------------------- templates/zshenv | 69 ++++++++++++++++++++++++++++++++++++ templates/zshrc | 3 -- 3 files changed, 69 insertions(+), 69 deletions(-) diff --git a/modules/environment/init.zsh b/modules/environment/init.zsh index 7460e727..92acd315 100644 --- a/modules/environment/init.zsh +++ b/modules/environment/init.zsh @@ -22,78 +22,12 @@ unsetopt BG_NICE # Don't run all background jobs at a lower priority. unsetopt HUP # Don't kill jobs on shell exit. unsetopt CHECK_JOBS # Don't report on jobs when shell exit. -# Paths -typeset -gU cdpath fpath mailpath manpath path -typeset -gUT INFOPATH infopath - -cdpath=( - $HOME - $cdpath -) - -infopath=( - /usr/local/share/info - /usr/share/info - $infopath -) - -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 - -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="vim" -export VISUAL="vim" -export PAGER='less' - # Grep if zstyle -t ':omz:environment:grep' color; then export GREP_COLOR='37;45' export GREP_OPTIONS='--color=auto' fi -# Browser (Default) -if [[ "$OSTYPE" == darwin* ]]; then - export BROWSER='open' -fi - -# Less -export LESSCHARSET="UTF-8" -export LESSHISTFILE='-' -export LESSEDIT='vim ?lm+%lm. %f' - -# 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' - -if (( $+commands[lesspipe.sh] )); then - export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-' -fi - # Termcap if zstyle -t ':omz:environment:termcap' color; then export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking diff --git a/templates/zshenv b/templates/zshenv index 89f92755..de7ebe8d 100644 --- a/templates/zshenv +++ b/templates/zshenv @@ -5,3 +5,72 @@ # Sorin Ionescu # +# 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 + +cdpath=( + $HOME + $cdpath +) + +infopath=( + /usr/local/share/info + /usr/share/info + $infopath +) + +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 + +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="vim" +export VISUAL="vim" +export PAGER='less' + +# Browser (Default) +if [[ "$OSTYPE" == darwin* ]]; then + export BROWSER='open' +fi + +# Less +export LESSCHARSET="UTF-8" +export LESSHISTFILE='-' +export LESSEDIT='vim ?lm+%lm. %f' + +# 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' + +if (( $+commands[lesspipe.sh] )); then + export LESSOPEN='| /usr/bin/env lesspipe.sh %s 2>&-' +fi + diff --git a/templates/zshrc b/templates/zshrc index 160a80ac..9305f90d 100644 --- a/templates/zshrc +++ b/templates/zshrc @@ -5,9 +5,6 @@ # Sorin Ionescu # -# Set the path to Oh My Zsh. -export OMZ="$HOME/.oh-my-zsh" - # Set the key mapping style to 'emacs' or 'vi'. zstyle ':omz:module:editor' keymap 'emacs' From 1645fb88bd7fb5786dbad8e7d5814ac6b0be551f Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 27 May 2012 17:04:01 -0400 Subject: [PATCH 04/15] [#171] Move launchd setenv into zlogin --- init.zsh | 10 +--------- templates/zlogin | 8 ++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/init.zsh b/init.zsh index 42c395ad..6fa7a5fb 100644 --- a/init.zsh +++ b/init.zsh @@ -37,15 +37,7 @@ zstyle -a ':omz:load' omodule 'omodules' omodload "$omodules[@]" unset omodules -# 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 - unset env_var -fi - -# Compile the completion dump, to increase startup speed. +# 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" diff --git a/templates/zlogin b/templates/zlogin index b13b6116..4697dee5 100644 --- a/templates/zlogin +++ b/templates/zlogin @@ -5,6 +5,14 @@ # Sorin Ionescu # +# 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 + unset env_var +fi + # Print a random, hopefully interesting, adage. if (( $+commands[fortune] )); then fortune -a From 39a60008e5e0bcd0d3a9d96a2f73b13db70528e3 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 27 May 2012 19:43:06 -0400 Subject: [PATCH 05/15] [#171] Move Zsh file compilation into zlogin --- init.zsh | 7 ------- templates/zlogin | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/init.zsh b/init.zsh index 6fa7a5fb..0249117d 100644 --- a/init.zsh +++ b/init.zsh @@ -37,10 +37,3 @@ zstyle -a ':omz:load' omodule 'omodules' omodload "$omodules[@]" unset omodules -# 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 -unset dump_file - diff --git a/templates/zlogin b/templates/zlogin index 4697dee5..8de491d9 100644 --- a/templates/zlogin +++ b/templates/zlogin @@ -5,6 +5,13 @@ # Sorin Ionescu # +# 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 +unset dump_file + # Set environment variables for launchd processes. if [[ "$OSTYPE" == darwin* ]]; then for env_var in PATH MANPATH; do From e97a85fba3d8a7feb938f738d98ed88668425163 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 27 May 2012 18:23:57 -0400 Subject: [PATCH 06/15] [#171] Update installation information, formatting --- README.md | 55 ++++++++++++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 4c5ba303..7892f8ca 100644 --- a/README.md +++ b/README.md @@ -11,23 +11,26 @@ Installation Oh My Zsh will work with any recent release of Zsh, but the minimum recommended version is 4.3.10. - 1. Clone the repository: + 1. Clone the repository: - `git clone https://github.com/sorin-ionescu/oh-my-zsh.git ~/.oh-my-zsh` + git clone https://github.com/sorin-ionescu/oh-my-zsh.git ~/.oh-my-zsh - 2. Initialize the submodules: + 2. Initialize the submodules: - `cd ~/.oh-my-zsh && git submodule update --init --recursive` + cd ~/.oh-my-zsh && git submodule update --init --recursive - 3. Create a new Zsh configuration by copying the Zsh template provided: + 3. Create a new Zsh configuration by copying the Zsh configuration file + templates provided: - `cp ~/.oh-my-zsh/templates/zshrc ~/.zshrc` + for rcfile in ~/.oh-my-zsh/templates/z{shenv,shrc,login,logout}; do + cp -f "${rcfile}" "${HOME}/.${rcfile}" + done - 4. Set Zsh as your default shell: + 4. Set Zsh as your default shell: - `chsh -s /bin/zsh` + chsh -s /bin/zsh - 5. Open a new Zsh terminal window or tab. + 5. Open a new Zsh terminal window or tab. ### Mac OS X @@ -51,29 +54,32 @@ directories end up at the tail of the array. ### Troubleshooting If you are not able to find certain commands after switching to *Oh My Zsh*, -modify the `PATH` variable in *environment.zsh* then open a new Zsh terminal +modify the `PATH` variable in *~/.zshenv* then open a new Zsh terminal window or tab. -## Usage +Usage +----- Oh My Zsh has many features disabled by default. Read the source code and 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. + 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. ### 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. - ![sorin theme][2] + 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. -## Customization + ![sorin theme][2] + +Customization +------------- The project is managed via [Git][3]. It is highly recommend that you commit your changes and push them to [GitHub][4] to not lose them. If you do not know @@ -84,18 +90,21 @@ how to use Git, follow this [tutorial][5] and bookmark this [reference][6]. Submit program completions to the [zsh-completions][7] project. The Oh My Zsh completions directory will be synched against it. -## Resources +Resources +--------- The [Zsh Reference Card][8] is indispensable. -## Contribute +Contribute +---------- This project would not exist without all of its users and [contributors][9]. If you have ideas on how to make the configuration easier to maintain or improve its performance, do not hesitate to fork and send pull requests. -## License +License +------- (The MIT License) From 0b0b2af07f3da5a15f010cb73cd1515d24b13cc2 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 27 May 2012 20:08:40 -0400 Subject: [PATCH 07/15] [Fix #171] Background non-session affecting code --- templates/zlogin | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/templates/zlogin b/templates/zlogin index 8de491d9..2854965a 100644 --- a/templates/zlogin +++ b/templates/zlogin @@ -5,20 +5,21 @@ # Sorin Ionescu # -# 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 -unset dump_file +# 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 - unset env_var -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 From 4fd347580ec4a4d15b8baef79efacd69fa7df042 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 31 May 2012 17:50:06 -0400 Subject: [PATCH 08/15] [Fix #104] Add documentation for environment --- modules/environment/README.md | 26 ++++++++++++++++++++++++++ modules/environment/init.zsh | 14 +++++++------- templates/zshenv | 6 ++++++ 3 files changed, 39 insertions(+), 7 deletions(-) create mode 100644 modules/environment/README.md diff --git a/modules/environment/README.md b/modules/environment/README.md new file mode 100644 index 00000000..01a2ec1b --- /dev/null +++ b/modules/environment/README.md @@ -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 + diff --git a/modules/environment/init.zsh b/modules/environment/init.zsh index 92acd315..cd6f4f76 100644 --- a/modules/environment/init.zsh +++ b/modules/environment/init.zsh @@ -30,12 +30,12 @@ fi # Termcap if zstyle -t ':omz:environment:termcap' color; then - export LESS_TERMCAP_mb=$'\E[01;31m' # begin blinking - export LESS_TERMCAP_md=$'\E[01;31m' # begin bold - export LESS_TERMCAP_me=$'\E[0m' # end mode - export LESS_TERMCAP_se=$'\E[0m' # end standout-mode - export LESS_TERMCAP_so=$'\E[00;47;30m' # begin standout-mode - export LESS_TERMCAP_ue=$'\E[0m' # end underline - export LESS_TERMCAP_us=$'\E[01;32m' # begin underline + export LESS_TERMCAP_mb=$'\E[01;31m' # Begins blinking. + export LESS_TERMCAP_md=$'\E[01;31m' # Begins bold. + export LESS_TERMCAP_me=$'\E[0m' # Ends mode. + export LESS_TERMCAP_se=$'\E[0m' # Ends standout-mode. + export LESS_TERMCAP_so=$'\E[00;47;30m' # Begins standout-mode. + export LESS_TERMCAP_ue=$'\E[0m' # Ends underline. + export LESS_TERMCAP_us=$'\E[01;32m' # Begins underline. fi diff --git a/templates/zshenv b/templates/zshenv index de7ebe8d..7acb3f84 100644 --- a/templates/zshenv +++ b/templates/zshenv @@ -12,17 +12,20 @@ export OMZ="$HOME/.oh-my-zsh" typeset -gU cdpath fpath mailpath manpath path typeset -gUT INFOPATH infopath +# Set the the list of directories that cd searches. cdpath=( $HOME $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 @@ -34,6 +37,7 @@ for path_file in /etc/manpaths.d/*(.N); do done unset path_file +# Set the list of directories that Zsh searches for programs. path=( /usr/local/{bin,sbin} /usr/{bin,sbin} @@ -66,10 +70,12 @@ export LESSCHARSET="UTF-8" export LESSHISTFILE='-' export LESSEDIT='vim ?lm+%lm. %f' +# 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 From a372ccf60376f12875bd74a45337a3b68ace9a69 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 31 May 2012 21:47:53 -0400 Subject: [PATCH 09/15] Remove the Less encoding environment variable LESSCHARSET is not needed since Less automatically detects the locale. --- templates/zshenv | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/zshenv b/templates/zshenv index 7acb3f84..a52fb6df 100644 --- a/templates/zshenv +++ b/templates/zshenv @@ -66,7 +66,6 @@ if [[ "$OSTYPE" == darwin* ]]; then fi # Less -export LESSCHARSET="UTF-8" export LESSHISTFILE='-' export LESSEDIT='vim ?lm+%lm. %f' From bff945babff883da2bacfbfb7c745f5f4c102a2e Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 31 May 2012 21:49:06 -0400 Subject: [PATCH 10/15] Enable the Less history file --- templates/zshenv | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/zshenv b/templates/zshenv index a52fb6df..21b0aa0b 100644 --- a/templates/zshenv +++ b/templates/zshenv @@ -66,7 +66,6 @@ if [[ "$OSTYPE" == darwin* ]]; then fi # Less -export LESSHISTFILE='-' export LESSEDIT='vim ?lm+%lm. %f' # Set the default Less options. From 6e64bb96dca15e62cff363144e848fd60b8b4e2c Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 31 May 2012 21:50:49 -0400 Subject: [PATCH 11/15] Use the default editor in Less --- templates/zshenv | 1 - 1 file changed, 1 deletion(-) diff --git a/templates/zshenv b/templates/zshenv index 21b0aa0b..b3412e2d 100644 --- a/templates/zshenv +++ b/templates/zshenv @@ -66,7 +66,6 @@ if [[ "$OSTYPE" == darwin* ]]; then fi # Less -export LESSEDIT='vim ?lm+%lm. %f' # Set the default Less options. # Mouse-wheel scrolling has been disabled by -X (disable screen clearing). From 5a88276e798a5134a183fd1db2c87640633302f9 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 31 May 2012 21:43:38 -0400 Subject: [PATCH 12/15] Replace Vim with nano The default keymap used in Oh My Zsh is Emacs. As such, the editor should not be set to Vim. Unfortunately, the editor cannot be set to Emacs because it is not always installed by default. Set the default editor to nano. --- templates/zshenv | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/zshenv b/templates/zshenv index b3412e2d..6efdda31 100644 --- a/templates/zshenv +++ b/templates/zshenv @@ -56,8 +56,8 @@ if [[ -z "$LANG" ]]; then fi # Editors -export EDITOR="vim" -export VISUAL="vim" +export EDITOR='nano' +export VISUAL='nano' export PAGER='less' # Browser (Default) From 333927ac3bab09e9ba1232639534e57441f47168 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 31 May 2012 21:59:36 -0400 Subject: [PATCH 13/15] Remove the home directory from $cdpath It is not necessary to add the home directory to cdpath. Since nothing is added to $cdpath by default, comment it out. --- templates/zshenv | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/templates/zshenv b/templates/zshenv index 6efdda31..af83ce06 100644 --- a/templates/zshenv +++ b/templates/zshenv @@ -13,10 +13,9 @@ typeset -gU cdpath fpath mailpath manpath path typeset -gUT INFOPATH infopath # Set the the list of directories that cd searches. -cdpath=( - $HOME - $cdpath -) +# cdpath=( +# $cdpath +# ) # Set the list of directories that info searches for manuals. infopath=( From 9f0501b14042b6d00c83c44b5b1ac0114dff33b2 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 31 May 2012 22:18:18 -0400 Subject: [PATCH 14/15] Move the completion module loading information --- modules/completion/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/completion/README.md b/modules/completion/README.md index e265a497..543ae182 100644 --- a/modules/completion/README.md +++ b/modules/completion/README.md @@ -4,15 +4,15 @@ Completion Loads and configures tab completion and provides additional completions from the [zsh-completions][1] project. +This module must be loaded **after** the *alias* module but **before** the +*utility* module. + Contributors ------------ Completions should be submitted to the [zsh-completions][1] project according to its rules and regulations. This module will be synched against it. -This module must be loaded **after** the *alias* module but **before** the -*utility* module. - Authors ------- From c28c5edd214d409742158a713ee438cc1d68e277 Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Thu, 31 May 2012 23:06:24 -0400 Subject: [PATCH 15/15] [Fix #99] Add documentation for archive --- modules/archive/README.md | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 modules/archive/README.md diff --git a/modules/archive/README.md b/modules/archive/README.md new file mode 100644 index 00000000..c997ddb2 --- /dev/null +++ b/modules/archive/README.md @@ -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 +