Permalink
Browse files

Merge remote-tracking branch 'upstream/master'

* upstream/master:
  Make gpg-agent and ssh-agent work with each other
  [Fix #425] Rewrite module ssh-agent; rename it to ssh
  [Fix #103] Add documentation for editor
  Remove the git-info SIGINT message
  [Fix #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 #221] Add a simple git-info
  [#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
  • Loading branch information...
2 parents 9a2122b + 1622abb commit ac72c9aef8a6d773786dff68b42b75bc2a894890 @gmaghera committed May 19, 2013
@@ -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`.
@@ -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"
@@ -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
@@ -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
+
@@ -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
@@ -4,12 +4,22 @@
# Authors: Sebastian Wiesner <lunaryorn@gmail.com>
#
-# 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'
View
@@ -64,7 +64,7 @@ Aliases
commits.
- `gcR` removes the *HEAD* commit.
- `gcs` displays various types of objects.
- - `gcl` displays lost commits.
+ - `gcl` lists lost commits.
### Conflict
@@ -97,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.
@@ -155,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.
@@ -170,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.
@@ -253,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
@@ -138,7 +138,7 @@ alias gRa='git remote add'
alias gRx='git remote rm'
alias gRm='git remote rename'
alias gRu='git remote update'
-alias gRc='git remote prune'
+alias gRp='git remote prune'
alias gRs='git remote show'
alias gRb='git-hub-browse'
@@ -147,9 +147,9 @@ alias gs='git stash'
alias gsa='git stash apply'
alias gsx='git stash drop'
alias gsX='git-stash-clear-interactive'
-alias gsd='git-stash-dropped'
alias gsl='git stash list'
-alias gsL='git stash show --patch --stat'
+alias gsL='git-stash-dropped'
+alias gsd='git stash show --patch --stat'
alias gsp='git stash pop'
alias gsr='git-stash-recover'
alias gss='git stash save --include-untracked'
Oops, something went wrong.

0 comments on commit ac72c9a

Please sign in to comment.