Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/sorin-ionescu/prezto into…
Browse files Browse the repository at this point in the history
… HEAD

* 'master' of https://github.com/sorin-ionescu/prezto: (25 commits)
  Comment an unnecessary style
  Stop module loading when external code fails to source
  Use correct option for pacman search aliases
  Do not define $GEM_HOME
  Simplify a conditional
  Remove duplicate alias definitions
  Add utility aliases for Cygwin
  Replace pythonz with pyenv
  Update external syntax-highlighting
  Update external history-substring-search
  Update external completions
  Clarify customization instructions
  Move from Carton to Cask
  Increase control over multiplexer auto-start
  [Fix sorin-ionescu#459] Correct typos in the dpkg module
  [Fix sorin-ionescu#452] Squash bugs introduced in fcab2a1
  [Fix sorin-ionescu#411] Add Homebrew module
  [Fix sorin-ionescu#434] Correct ambiguity in the use of the term keymap
  Rename archive module functions
  [Fix sorin-ionescu#436] Update link to Bombich rsync
  ...
  • Loading branch information
admk committed Sep 22, 2013
2 parents a19cdee + eb1a205 commit ce6a850
Show file tree
Hide file tree
Showing 34 changed files with 200 additions and 124 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,10 @@ accompanying README files to learn of what is available.
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
how to use Git, follow this [tutorial][5] and bookmark this [reference][6].
The project is managed via [Git][3]. It is highly recommended that you fork this
project; so, that you can commit your changes and push them to [GitHub][4] to
not lose them. If you do not know how to use Git, follow this [tutorial][5] and
bookmark this [reference][6].

Resources
---------
Expand Down
7 changes: 6 additions & 1 deletion modules/README.md
Original file line number Diff line number Diff line change
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 @@ -71,6 +71,11 @@ History

Sets history options and defines history aliases.

Homebrew
--------

Defines Homebrew aliases.

Macports
--------

Expand Down
6 changes: 3 additions & 3 deletions modules/archive/README.md
Original file line number Diff line number Diff line change
@@ -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 Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#compdef ls-archive
#compdef lsarchive
#autoload

#
# Completes ls-archive.
# Completes lsarchive.
#
# Authors:
# Sorin Ionescu <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#compdef extract
#compdef unarchive
#autoload

#
# Completes extract.
# Completes unarchive.
#
# Authors:
# Sorin Ionescu <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Lists the contents of popular archive formats.
# Lists the contents of archives.
#
# Authors:
# Sorin Ionescu <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Extracts the contents of popular archive formats.
# Extracts the contents of archives.
#
# Authors:
# Sorin Ionescu <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion modules/completion/external
Submodule external updated 18 files
+45 −9 src/_ack
+8 −1 src/_brew
+1 −1 src/_bundle
+139 −0 src/_celery
+13 −3 src/_coffee
+48 −10 src/_gem
+145 −0 src/_jekyll
+78 −0 src/_jq
+43 −0 src/_mina
+94 −28 src/_pip
+43 −0 src/_primus
+580 −0 src/_rails
+115 −0 src/_ralio
+4 −0 src/_ssh-copy-id
+45 −1 src/_vagrant
+164 −0 src/_veewee
+57 −0 src/_wemux
+8 −3 src/_yaourt
6 changes: 3 additions & 3 deletions modules/dpkg/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ Aliases
-------

- `debc` cleans the cache.
- `debf` displays a file's packake.
- `debf` displays a file's package.
- `debi` installs packages from repositories.
- `debI` installs packages from files.
- `debq` displays package information.
- `debu` updates the packages lists.
- `debu` updates the package lists.
- `debU` upgrades outdated packages.
- `debx` removes packages.
- `debX` removes packages, their configuration, and unneeded dependencies.
- `debs` searches for packages.
- `deb-build` creates a basic .deb package.
- `deb-build` creates a basic deb package.
- `deb-kclean` removes all kernel images and headers, except for the ones in
use.

Expand Down
6 changes: 3 additions & 3 deletions modules/dpkg/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fi
# Cleans the cache.
alias debc='sudo apt-get clean && sudo apt-get autoclean'

# Displays a file's packake.
# Displays a file's package.
alias debf='apt-file search --regexp'

# Installs packages from repositories.
Expand All @@ -31,7 +31,7 @@ alias debI='sudo dpkg -i'
# Displays package information.
alias debq='apt-cache show'

# Updates the packages lists.
# Updates the package lists.
alias debu='sudo apt-get update'

# Upgrades outdated packages.
Expand All @@ -50,7 +50,7 @@ else
alias debs='apt-cache search'
fi

# Creates a basic .deb package.
# Creates a basic deb package.
alias deb-build='time dpkg-buildpackage -rfakeroot -us -uc'

# Removes all kernel images and headers, except for the ones in use.
Expand Down
6 changes: 3 additions & 3 deletions modules/editor/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Settings

### Key bindings

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

zstyle ':prezto:module:editor' keymap 'map'
zstyle ':prezto:module:editor' key-bindings 'bindings'

### Dot Expansion

Expand Down
10 changes: 5 additions & 5 deletions modules/editor/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -306,14 +306,14 @@ fi
#

# Set the key layout.
zstyle -s ':prezto:module:editor' keymap 'keymap'
if [[ "$keymap" == (emacs|) ]]; then
zstyle -s ':prezto:module:editor' key-bindings 'key_bindings'
if [[ "$key_bindings" == (emacs|) ]]; then
bindkey -e
elif [[ "$keymap" == vi ]]; then
elif [[ "$key_bindings" == vi ]]; then
bindkey -v
else
print "prezto: invalid keymap: $keymap" >&2
print "prezto: editor: invalid key bindings: $key_bindings" >&2
fi

unset key{map,}
unset key{,map,bindings}

16 changes: 8 additions & 8 deletions modules/emacs/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
#

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

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

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

#
# Aliases
#

alias cai='carton install'
alias cau='carton update'
alias caI='carton init'
alias cae='carton exec'
alias cai='cask install'
alias cau='cask update'
alias caI='cask init'
alias cae='cask exec'
2 changes: 1 addition & 1 deletion modules/history-substring-search/external
Submodule external updated 1 files
+3 −5 README.md
2 changes: 1 addition & 1 deletion modules/history-substring-search/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
pmodload 'editor'

# Source module files.
source "${0:h}/external/zsh-history-substring-search.zsh"
source "${0:h}/external/zsh-history-substring-search.zsh" || return 1

#
# Search
Expand Down
26 changes: 26 additions & 0 deletions modules/homebrew/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Homebrew
========

Defines Homebrew aliases.

Aliases
-------

- `brewc` cleans outdated brews and their cached archives.
- `brewC` cleans outdated brews, including keg-only, and their cached archives.
- `brewi` installs a formula.
- `brewl` lists installed formulae.
- `brews` searches for a formula.
- `brewU` upgrades Homebrew and outdated brews.
- `brewu` upgrades Homebrew.
- `brewx` uninstalls a formula.

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/prezto/issues

25 changes: 25 additions & 0 deletions modules/homebrew/init.zsh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Defines Homebrew aliases.
#
# Authors:
# Sorin Ionescu <[email protected]>
#

# Return if requirements are not found.
if [[ "$OSTYPE" != darwin* ]]; then
return 1
fi

#
# Aliases
#

alias brewc='brew cleanup'
alias brewC='brew cleanup --force'
alias brewi='brew install'
alias brewl='brew list'
alias brews='brew search'
alias brewu='brew upgrade'
alias brewU='brew update && brew upgrade'
alias brewx='brew remove'

2 changes: 1 addition & 1 deletion modules/pacman/functions/pacman-list-disowned
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Sorin Ionescu <[email protected]>
#

local tmp="${TMPDIR:-/tmp}/pacman-disowned-$UID-$$"
local tmp="$TMPDIR/pacman-disowned-$UID-$$"
local db="$tmp/db"
local fs="$tmp/fs"

Expand Down
4 changes: 2 additions & 2 deletions modules/pacman/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,10 @@ alias pacq='pacman --sync --info'
alias pacQ='pacman --query --info'

# Searches for packages in the repositories.
alias pacs='pacman --sync --recursive'
alias pacs='pacman --sync --search'

# Searches for packages in the local database.
alias pacS='pacman --query --recursive'
alias pacS='pacman --query --search'

# Lists orphan packages.
alias pacman-list-orphans='sudo pacman --query --deps --unrequired'
Expand Down
20 changes: 5 additions & 15 deletions modules/python/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ Enables local Python and local Python package installation.
Local Python Installation
-------------------------

[pythonz][4] builds and installs multiple Python versions locally in the home
[pyenv][4] builds and installs multiple Python versions locally in the home
directory.

This module prepends the pythonz directory to the path variable to enable the
execution of `pythonz`.
This module prepends the pyenv directory to the path variable to enable the
execution of `pyenv`.

### Usage

Install Python versions with `pythonz install` into *~/.pythonz/pythons*.
Install Python versions with `pyenv install` into *~/.pyenv/versions*.

Local Package Installation
--------------------------
Expand Down Expand Up @@ -66,16 +66,6 @@ Aliases

- `py` is short for `python`.

### Pythonz

- `pyz` is short for `pythonz`.
- `pyzc` removes stale source folders and archives.
- `pyzi` installs Python versions.
- `pyzl` lists installed Python versions.
- `pyzL` lists available Python versions.
- `pyzu` updates itself to the latest version.
- `pyzx` uninstalls Python versions.

Functions
---------

Expand Down Expand Up @@ -105,6 +95,6 @@ Authors
[1]: http://www.python.org/dev/peps/pep-0370/
[2]: http://www.doughellmann.com/projects/virtualenvwrapper/
[3]: http://pypi.python.org/pypi/virtualenv
[4]: http://saghul.github.com/pythonz/
[4]: https://github.com/yyuu/pyenv
[5]: https://github.com/sorin-ionescu/prezto/issues

43 changes: 19 additions & 24 deletions modules/python/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,35 @@
# Sebastian Wiesner <[email protected]>
#

# Load pythonz into the shell session.
if [[ -s $HOME/.pythonz/bin/pythonz ]]; then
path=($HOME/.pythonz/bin $path)
fi
# Load manually installed pyenv into the shell session.
if [[ -s "$HOME/.pyenv/bin/pyenv" ]]; then
path=("$HOME/.pyenv/bin" $path)
eval "$(pyenv init -)"

# Return if requirements are not found.
if (( ! $+commands[python] && ! $+commands[pythonz] )); then
return 1
fi
# Load package manager installed pyenv into the shell session.
elif (( $+commands[pyenv] )); then
eval "$(pyenv init -)"

# Prepend PEP 370 per user site packages directory, which defaults to
# ~/Library/Python on Mac OS X and ~/.local elsewhere, to PATH.
if [[ "$OSTYPE" == darwin* ]]; then
path=($HOME/Library/Python/*/bin(N) $path)
else
# This is subject to change.
path=($HOME/.local/bin $path)
if [[ "$OSTYPE" == darwin* ]]; then
path=($HOME/Library/Python/*/bin(N) $path)
else
# This is subject to change.
path=($HOME/.local/bin $path)
fi
fi

# Return if requirements are not found.
if (( ! $+commands[python] && ! $+commands[pyenv] )); then
return 1
fi

# Load virtualenvwrapper into the shell session.
if (( $+commands[virtualenvwrapper_lazy.sh] )); then
# Set the directory where virtual environments are stored.
export WORKON_HOME=$HOME/.virtualenvs
export WORKON_HOME="$HOME/.virtualenvs"

# Disable the virtualenv prompt.
VIRTUAL_ENV_DISABLE_PROMPT=1
Expand All @@ -42,14 +48,3 @@ fi

alias py='python'

# pythonz
if (( $+commands[pythonz] )); then
alias pyz='pythonz'
alias pyzc='pythonz cleanup'
alias pyzi='pythonz install'
alias pyzl='pythonz list'
alias pyzL='pythonz list -a'
alias pyzu='pythonz update'
alias pyzx='pythonz uninstall'
fi

Loading

0 comments on commit ce6a850

Please sign in to comment.