Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master'
Browse files Browse the repository at this point in the history
* upstream/master: (39 commits)
  [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
  Refactor Emacs module
  Load completion for Carton
  Correct syntax error in variable assignment
  ...
  • Loading branch information
trongrg committed May 27, 2013
2 parents 2992693 + 20655c8 commit 8e4a2f3
Show file tree
Hide file tree
Showing 37 changed files with 573 additions and 428 deletions.
4 changes: 2 additions & 2 deletions modules/README.md
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion modules/archive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 3 additions & 1 deletion modules/archive/functions/extract
Original file line number Diff line number Diff line change
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
4 changes: 3 additions & 1 deletion modules/archive/functions/ls-archive
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion modules/completion/external
Submodule external updated 9 files
+21 −5 src/_brew
+44 −0 src/_dzen2
+34 −2 src/_gem
+33 −1 src/_heroku
+70 −0 src/_id3
+116 −0 src/_id3v2
+8 −1 src/_knife
+144 −81 src/_port
+169 −0 src/_svm
3 changes: 0 additions & 3 deletions modules/completion/init.zsh
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
@@ -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

39 changes: 3 additions & 36 deletions modules/editor/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,6 @@
# Authors:
# Sorin Ionescu <[email protected]>
#
# 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
26 changes: 18 additions & 8 deletions modules/emacs/init.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,22 @@
# Authors: Sebastian Wiesner <[email protected]>
#

# Enable Carton
if [[ -d "$HOME/.carton" ]]; then
path=($HOME/.carton/bin $path)

alias cai='carton install'
alias cau='carton update'
alias caI='carton init'
alias cae='carton exec'
# 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
Original file line number Diff line number Diff line change
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
71 changes: 45 additions & 26 deletions modules/git/README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
Git
===

Enhances the [Git][1] distributed version control system by providing aliases, functions and by exposing repository status information to prompts.
Enhances the [Git][1] distributed version control system by providing aliases,
functions and by exposing repository status information to prompts.

Git **1.7.2** is the [minimum required version][7].

Expand All @@ -12,7 +13,7 @@ Settings

The format of the [git-log][8] output is configurable via the following style,
where context is *brief*, *oneline*, and *medium*, which will be passed to the
`--prety=format:` switch.
`--pretty=format:` switch.

zstyle ':prezto:module:git:log:context' format ''

Expand All @@ -38,8 +39,8 @@ Aliases
- `gbc` creates a new branch.
- `gbl` lists branches and their commits.
- `gbL` lists local and remote branches and their commits.
- `gbs` lists branches and their commits with ancestery graphs.
- `gbS` lists local and remote branches and their commits with ancestery
- `gbs` lists branches and their commits with ancestry graphs.
- `gbS` lists local and remote branches and their commits with ancestry
graphs.
- `gbx` deletes a branch.
- `gbX` deletes a branch irrespective of its merged status.
Expand All @@ -63,7 +64,17 @@ Aliases
commits.
- `gcR` removes the *HEAD* commit.
- `gcs` displays various types of objects.
- `gcl` displays lost commits.
- `gcl` lists lost commits.

### Conflict

- `gCl` lists unmerged files.
- `gCa` adds unmerged file contents to the index.
- `gCe` executes merge-tool on all unmerged file.
- `gCo` checks out our changes for unmerged paths.
- `gCO` checks out our changes for all unmerged paths.
- `gCt` checks out their changes for unmerged paths.
- `gCT` checks out their changes for all unmerged paths.

### Data

Expand All @@ -86,8 +97,8 @@ Aliases

- `gg` displays lines matching a pattern.
- `ggi` displays lines matching a pattern ignoring case.
- `ggl` displays files matching a pattern.
- `ggL` displays files are not matching a pattern.
- `ggl` lists files matching a pattern.
- `ggL` lists files that are not matching a pattern.
- `ggv` displays lines not matching a pattern.
- `ggw` displays lines matching a pattern at word boundary.

Expand All @@ -103,16 +114,6 @@ Aliases
- `gix` removes files/directories from the index (recursively).
- `giX` removes files/directories from the index (recursively and forced).

### Conflict

- `gCl` lists unmerged files.
- `gCa` adds unmerged file contents to the index.
- `gCe` executes merge-tool on all unmerged file.
- `gCo` checks out our changes for unmerged paths.
- `gCO` checks out our changes for all unmerged paths.
- `gCt` checks out their changes for unmerged paths.
- `gCT` checks out their changes for all unmerged paths.

### Log

- `gl` displays the log.
Expand Down Expand Up @@ -154,12 +155,12 @@ Aliases
### Remote

- `gR` manages tracked repositories.
- `gRl` displays remote names and URLs.
- `gRl` lists remote names and their URLs.
- `gRa` adds a new remote.
- `gRx` removes a remote.
- `gRm` renames a remote.
- `gRu` fetches remotes updates.
- `gRc` deletes all stale remote tracking branches.
- `gRp` prunes all stale remote tracking branches.
- `gRs` displays information about a given remote.
- `gRb` opens a remote on [GitHub][3] in the default browser.

Expand All @@ -169,10 +170,9 @@ Aliases
- `gsa` applies the changes recorded in a stash to the working directory.
- `gsx` drops a stashed state.
- `gsX` drops all the stashed states.
- `gsd` lists dropped stashed states.
- `gsl` lists stashed states.
- `gsL` displays the changes recorded in the stash as a diff between the
stashed state and its original parent.
- `gsL` lists dropped stashed states.
- `gsd` displays changes between the stash and its original parent.
- `gsp` removes and applies a single stashed state from the stash list.
- `gsr` recovers a given stashed state.
- `gss` stashes the changes of the dirty working directory, including untracked.
Expand Down Expand Up @@ -252,19 +252,38 @@ setting a style is as follows.
| Name | Format Code | Description
| --------- | :---------: | ---------------------------------------------------
| action | %s | Special action name
| added | %a | Added files count
| ahead | %A | Commits ahead of remote count
| behind | %B | Commits behind of remote count
| branch | %b | Branch name
| commit | %c | Commit hash
| position | %p | Commits from the nearest tag count
| remote | %R | Remote name
| stashed | %S | Stashed states count

### Concise Contexts

| Name | Format Code | Description
| --------- | :---------: | ---------------------------------------------------
| clean | %C | Clean state
| dirty | %D | Dirty files count
| indexed | %i | Indexed files count
| unindexed | %I | Unindexed files count
| untracked | %u | Untracked files count

The following contexts must be enabled with the following zstyle:

zstyle ':prezto:module:git:info' verbose 'yes'

### Verbose Contexts

| Name | Format Code | Description
| --------- | :---------: | ---------------------------------------------------
| added | %a | Added files count
| clean | %C | Clean state
| deleted | %d | Deleted files count
| dirty | %D | Dirty files count
| modified | %m | Modified files count
| position | %p | Commits from the nearest tag count
| remote | %R | Remote name
| renamed | %r | Renamed files count
| stashed | %S | Stashed states count
| unmerged | %U | Unmerged files count
| untracked | %u | Untracked files count

Expand Down
Loading

0 comments on commit 8e4a2f3

Please sign in to comment.