Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (52 commits)
  Rename archive module functions
  [Fix sorin-ionescu#436] Update link to Bombich rsync
  Revert "[Fix sorin-ionescu#436] Remove Bombich rsync references"
  [Fix sorin-ionescu#436] Remove Bombich rsync references
  Add the RubyGems bin directory to PATH on other Unix systems
  Do not substitute /tmp since $TMPDIR is always set
  [Fix sorin-ionescu#437] Always set $TMPDIR
  Make gpg-agent and ssh-agent work with each other
  [Fix sorin-ionescu#425] Rewrite module ssh-agent; rename it to ssh
  [Fix sorin-ionescu#103] Add documentation for editor
  Remove the git-info SIGINT message
  [Fix sorin-ionescu#307] Do not auto-off git-info
  Remove ununsed variable
  Clarify Git listing aliases descriptions
  Swap aliases gsd and gsL
  Rename alias gRc to gRp
  [Fix sorin-ionescu#221] Add a simple git-info
  [sorin-ionescu#221] Do not format undefined zstyles
  Initialize ahead and behind local variables
  Add rar command to archive module
  ...

Conflicts:
	runcoms/zpreztorc
  • Loading branch information
Alexis GRIMALDI committed Jul 11, 2013
2 parents ba8cad8 + 16aa48b commit c0f4127
Show file tree
Hide file tree
Showing 48 changed files with 702 additions and 543 deletions.
19 changes: 0 additions & 19 deletions README.md
Expand Up @@ -33,25 +33,6 @@ version is 4.3.10.

5. Open a new Zsh terminal window or tab.

### Mac OS X

If you have administrator privileges, you must fix an Apple-introduced problem
in Mac OS X 10.5 Leopard by executing the following command, or BASH and Zsh
will have the wrong `PATH` when executed non-interactively.

sudo chmod ugo-x /usr/libexec/path_helper

`path_helper` is intended to make it easier for installers to add new paths to
the environment without having to edit shell configuration files by adding
a file with a path to the */etc/paths.d* directory.

Unfortunately, `path_helper` always reads paths from */etc/paths* set by Apple
then paths from */etc/paths.d* set by third party installers, and lastly paths
from the `PATH` environment variable set by the parent process, which
ultimately is set by the user with `export PATH=...` Thus, it reorders path
priorities, and user */bin* directories meant to override system */bin*
directories end up at the tail of the array.

### Troubleshooting

If you are not able to find certain commands after switching to *Prezto*,
Expand Down
6 changes: 3 additions & 3 deletions modules/README.md
Expand Up @@ -8,7 +8,7 @@ Load modules in *zpreztorc*. The order matters.
Archive
-------

Provides functions to extract and list popular archive formats.
Provides functions to list and extract archives.

Command-Not-Found
-----------------
Expand Down Expand Up @@ -46,10 +46,10 @@ GNU Utility

Provides for the interactive use of GNU utilities on non-GNU systems.

GPG-Agent
GPG
---------

Provides for an easier use of gpg-agent.
Provides for an easier use of GPG by setting up gpg-agent.

Haskell
-------
Expand Down
8 changes: 4 additions & 4 deletions modules/archive/README.md
@@ -1,13 +1,13 @@
Archive
=======

Provides functions to extract and list popular archive formats.
Provides functions to list and extract archives.

Functions
---------

- `extract` extracts the contents of one or more archives.
- `ls-archive` lists the contents of one or more archives.
- `lsarchive` lists the contents of one or more archives.
- `unarchive` extracts the contents of one or more archives.

Supported Formats
-----------------
Expand All @@ -26,7 +26,7 @@ installed:
- *.lzma* requires `unlzma`.
- *.Z* requires `uncompress`.
- *.zip* requires `unzip`.
- *.rar* requires `unrar`.
- *.rar* requires `unrar` or `rar`.
- *.7z* requires `7za`.
- *.deb* requires `ar`, `tar`.

Expand Down
@@ -1,8 +1,8 @@
#compdef ls-archive
#compdef lsarchive
#autoload

#
# Completes ls-archive.
# Completes lsarchive.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
Expand Down
@@ -1,8 +1,8 @@
#compdef extract
#compdef unarchive
#autoload

#
# Completes extract.
# Completes unarchive.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
Expand Down
@@ -1,5 +1,5 @@
#
# Lists the contents of popular archive formats.
# Lists the contents of archives.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
Expand Down Expand Up @@ -41,7 +41,9 @@ while (( $# > 0 )); do
|| lzcat "$1" | tar x${verbose:+v}f - ;;
(*.tar) tar t${verbose:+v}f "$1" ;;
(*.zip) unzip -l${verbose:+v} "$1" ;;
(*.rar) unrar ${${verbose:+v}:-l} "$1" ;;
(*.rar) unrar &> /dev/null \
&& unrar ${${verbose:+v}:-l} "$1" \
|| rar ${${verbose:+v}:-l} "$1" ;;
(*.7z) 7za l "$1" ;;
(*)
print "$0: cannot list: $1" >&2
Expand Down
@@ -1,5 +1,5 @@
#
# Extracts the contents of popular archive formats.
# Extracts the contents of archives.
#
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
Expand Down Expand Up @@ -53,7 +53,9 @@ while (( $# > 0 )); do
(*.lzma) unlzma "$1" ;;
(*.Z) uncompress "$1" ;;
(*.zip) unzip "$1" -d $extract_dir ;;
(*.rar) unrar e -ad "$1" ;;
(*.rar) unrar &> /dev/null \
&& unrar e -ad "$1" \
|| rar e -ad "$1" ;;
(*.7z) 7za x "$1" ;;
(*.deb)
mkdir -p "$extract_dir/control"
Expand Down
3 changes: 0 additions & 3 deletions modules/completion/init.zsh
Expand Up @@ -30,9 +30,6 @@ setopt AUTO_PARAM_SLASH # If completed parameter is a directory, add a traili
unsetopt MENU_COMPLETE # Do not autoselect the first completion entry.
unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.

# Treat these characters as part of a word.
WORDCHARS='*?_-.[]~&;!#$%^(){}<>'

#
# Styles
#
Expand Down
63 changes: 63 additions & 0 deletions modules/editor/README.md
@@ -0,0 +1,63 @@
Editor
======

Sets key bindings.

Settings
--------

### Key bindings

To enable key bindings, add the following to *zpreztorc*, and replace 'map' with
'emacs' or 'vi'.

zstyle ':prezto:module:editor' keymap 'map'

### Dot Expansion

To enable the auto conversion of .... to ../.., add the following to
*zpreztorc*.

zstyle ':prezto:module:editor' dot-expansion 'yes'

Theming
-------

To indicate when the editor is in the primary keymap (emacs or viins), add
the following to your `theme_prompt_setup` function.

zstyle ':prezto:module:editor:info:keymap:primary' format '>>>'

To indicate when the editor is in the primary keymap (emacs or viins) insert
mode, add the following to your `theme_prompt_setup` function.

zstyle ':prezto:module:editor:info:keymap:primary:insert' format 'I'

To indicate when the editor is in the primary keymap (emacs or viins) overwrite
mode, add the following to your `theme_prompt_setup` function.

zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format 'O'

To indicate when the editor is in the alternate keymap (vicmd), add the
following to your `theme_prompt_setup` function.

zstyle ':prezto:module:editor:info:keymap:alternate' format '<<<'

To indicate when the editor is completing, add the following to your
`theme_prompt_setup` function.

zstyle ':prezto:module:editor:info:completing' format '...'

Then add `$editor_info[context]`, where context is *keymap*, *insert*, or
*overwrite*, to `$PROMPT` or `$RPROMPT` and call `editor-info` in the
`prompt_name_preexec` hook function.

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

46 changes: 6 additions & 40 deletions modules/editor/init.zsh
Expand Up @@ -4,42 +4,6 @@
# Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com>
#
# Usage:
# 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
# zpreztorc.
#
# zstyle ':prezto:module:editor' dot-expansion 'yes'
#
# To indicate when the editor is in the primary keymap (emacs or viins), add
# the following to your theme prompt setup function.
#
# zstyle ':prezto:module:editor:info:keymap:primary' format '>>>'
#
# To indicate when the editor is in the primary keymap (emacs or viins) insert
# mode, add the following to your theme prompt setup function.
#
# zstyle ':prezto:module:editor:info:keymap:primary:insert' format 'I'
#
# To indicate when the editor is in the primary keymap (emacs or viins)
# overwrite mode, add the following to your theme prompt setup function.
#
# zstyle ':prezto:module:editor:info:keymap:primary:overwrite' format 'O'
#
# To indicate when the editor is in the alternate keymap (vicmd), add the
# following to your theme prompt setup function.
#
# zstyle ':prezto:module:editor:info:keymap:alternate' format '<<<'
#
# To indicate when the editor is completing, add the following to your theme
# prompt setup function.
#
# zstyle ':prezto:module:editor:info:completing' format '...'
#

# Return if requirements are not found.
if [[ "$TERM" == 'dumb' ]]; then
Expand All @@ -57,6 +21,9 @@ setopt BEEP
# Variables
#

# Treat these characters as part of a word.
WORDCHARS='*?_-.[]~&;!#$%^(){}<>'

# Use human-friendly identifiers.
zmodload zsh/terminfo
typeset -gA key_info
Expand Down Expand Up @@ -90,12 +57,11 @@ key_info=(
'BackTab' "$terminfo[kcbt]"
)

# Do not bind any keys if there are empty values in $key_info.
# Set empty $key_info values to an invalid UTF-8 sequence to induce silent
# bindkey failure.
for key in "${(k)key_info[@]}"; do
if [[ -z "$key_info[$key]" ]]; then
print "prezto: one or more keys are non-bindable" >&2
unset key{,_info}
return 1
key_info["$key"]=''
fi
done

Expand Down
33 changes: 33 additions & 0 deletions modules/emacs/README.md
@@ -0,0 +1,33 @@
Emacs
=====

Enables Emacs dependency management.

Dependency management
---------------------

[Carton][1] installs and manages Emacs packages for Emacs package development
and Emacs configuration.

This module prepends the Carton directory to the path variable to enable the
execution of `carton`.

Aliases
-------

### Carton

- `cai` installs dependencies.
- `cau` updates dependencies.
- `caI` initializes the current directory for dependency management.
- `cae` executes a command which correct dependencies.

Authors
-------

*The authors of this module should be contacted via the [issue tracker][2].*

- [Sebastian Wiesner](https://github.com/lunaryorn)

[1]: https://github.com/rejeep/carton
[2]: https://github.com/sorin-ionescu/prezto/issues
25 changes: 25 additions & 0 deletions modules/emacs/init.zsh
@@ -0,0 +1,25 @@
#
# Configures Emacs dependency management.
#
# Authors: Sebastian Wiesner <lunaryorn@gmail.com>
#

# Return if requirements are not found.
if [[ ! -d "$HOME/.carton" ]]; then
return 1
fi

# Prepend Carton bin directory.
path=($HOME/.carton/bin $path)

# Load Carton completion
source "$HOME/.carton/etc/carton_completion.zsh" 2> /dev/null

#
# Aliases
#

alias cai='carton install'
alias cau='carton update'
alias caI='carton init'
alias cae='carton exec'
2 changes: 2 additions & 0 deletions modules/environment/init.zsh
Expand Up @@ -17,6 +17,8 @@ zle -N self-insert url-quote-magic
#

setopt BRACE_CCL # Allow brace character class list expansion.
setopt COMBINING_CHARS # Combine zero-length punctuation characters (accents)
# with the base character.
setopt RC_QUOTES # Allow 'Henry''s Garage' instead of 'Henry'\''s Garage'.
unsetopt MAIL_WARNING # Don't print a warning message if a mail file has been accessed.

Expand Down

0 comments on commit c0f4127

Please sign in to comment.