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: (35 commits)
  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
  Ensure that the tmux server is started
  [Fix sorin-ionescu#426] Correct syntax error in variable assignment
  [Fix sorin-ionescu#419] Rewrite module gpg-agent; rename it to gpg
  [Fix sorin-ionescu#52] Add zstyles to configure history-substring-search
  ...
  • Loading branch information
admk committed May 20, 2013
2 parents 15159e8 + 1622abb commit a19cdee
Show file tree
Hide file tree
Showing 33 changed files with 561 additions and 415 deletions.
4 changes: 2 additions & 2 deletions modules/README.md
Expand Up @@ -46,10 +46,10 @@ GNU Utility


Provides for the interactive use of GNU utilities on non-GNU systems. 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 Haskell
------- -------
Expand Down
2 changes: 1 addition & 1 deletion modules/archive/README.md
Expand Up @@ -26,7 +26,7 @@ installed:
- *.lzma* requires `unlzma`. - *.lzma* requires `unlzma`.
- *.Z* requires `uncompress`. - *.Z* requires `uncompress`.
- *.zip* requires `unzip`. - *.zip* requires `unzip`.
- *.rar* requires `unrar`. - *.rar* requires `unrar` or `rar`.
- *.7z* requires `7za`. - *.7z* requires `7za`.
- *.deb* requires `ar`, `tar`. - *.deb* requires `ar`, `tar`.


Expand Down
4 changes: 3 additions & 1 deletion modules/archive/functions/extract
Expand Up @@ -53,7 +53,9 @@ while (( $# > 0 )); do
(*.lzma) unlzma "$1" ;; (*.lzma) unlzma "$1" ;;
(*.Z) uncompress "$1" ;; (*.Z) uncompress "$1" ;;
(*.zip) unzip "$1" -d $extract_dir ;; (*.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" ;; (*.7z) 7za x "$1" ;;
(*.deb) (*.deb)
mkdir -p "$extract_dir/control" mkdir -p "$extract_dir/control"
Expand Down
4 changes: 3 additions & 1 deletion modules/archive/functions/ls-archive
Expand Up @@ -41,7 +41,9 @@ while (( $# > 0 )); do
|| lzcat "$1" | tar x${verbose:+v}f - ;; || lzcat "$1" | tar x${verbose:+v}f - ;;
(*.tar) tar t${verbose:+v}f "$1" ;; (*.tar) tar t${verbose:+v}f "$1" ;;
(*.zip) unzip -l${verbose:+v} "$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" ;; (*.7z) 7za l "$1" ;;
(*) (*)
print "$0: cannot list: $1" >&2 print "$0: cannot list: $1" >&2
Expand Down
2 changes: 1 addition & 1 deletion modules/completion/external
Submodule external updated 18 files
+2 −2 README.md
+1 −1 src/_ack
+5 −0 src/_adb
+89 −0 src/_ag
+21 −5 src/_brew
+44 −0 src/_dzen2
+36 −4 src/_gem
+93 −8 src/_git-flow
+33 −1 src/_heroku
+70 −0 src/_id3
+116 −0 src/_id3v2
+8 −1 src/_knife
+61 −0 src/_logger
+144 −81 src/_port
+52 −8 src/_sbt
+49 −12 src/_scala
+233 −0 src/_socat
+169 −0 src/_svm
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 MENU_COMPLETE # Do not autoselect the first completion entry.
unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor. unsetopt FLOW_CONTROL # Disable start/stop characters in shell editor.


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

# #
# Styles # 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

39 changes: 3 additions & 36 deletions modules/editor/init.zsh
Expand Up @@ -4,42 +4,6 @@
# Authors: # Authors:
# Sorin Ionescu <sorin.ionescu@gmail.com> # 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. # Return if requirements are not found.
if [[ "$TERM" == 'dumb' ]]; then if [[ "$TERM" == 'dumb' ]]; then
Expand All @@ -57,6 +21,9 @@ setopt BEEP
# Variables # Variables
# #


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

# Use human-friendly identifiers. # Use human-friendly identifiers.
zmodload zsh/terminfo zmodload zsh/terminfo
typeset -gA key_info typeset -gA key_info
Expand Down
26 changes: 18 additions & 8 deletions modules/emacs/init.zsh
Expand Up @@ -4,12 +4,22 @@
# Authors: Sebastian Wiesner <lunaryorn@gmail.com> # Authors: Sebastian Wiesner <lunaryorn@gmail.com>
# #


# Enable Carton # Return if requirements are not found.
if [[ -d "$HOME/.carton" ]]; then if [[ ! -d "$HOME/.carton" ]]; then
path=($HOME/.carton/bin $path) return 1

alias cai='carton install'
alias cau='carton update'
alias caI='carton init'
alias cae='carton exec'
fi 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 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'. 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. 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
@@ -1,7 +1,8 @@
Git 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]. 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, 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 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 '' zstyle ':prezto:module:git:log:context' format ''


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


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


- `gg` displays lines matching a pattern. - `gg` displays lines matching a pattern.
- `ggi` displays lines matching a pattern ignoring case. - `ggi` displays lines matching a pattern ignoring case.
- `ggl` displays files matching a pattern. - `ggl` lists files matching a pattern.
- `ggL` displays files are not matching a pattern. - `ggL` lists files that are not matching a pattern.
- `ggv` displays lines not matching a pattern. - `ggv` displays lines not matching a pattern.
- `ggw` displays lines matching a pattern at word boundary. - `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).
- `giX` removes files/directories from the index (recursively and forced). - `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 ### Log


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


- `gR` manages tracked repositories. - `gR` manages tracked repositories.
- `gRl` displays remote names and URLs. - `gRl` lists remote names and their URLs.
- `gRa` adds a new remote. - `gRa` adds a new remote.
- `gRx` removes a remote. - `gRx` removes a remote.
- `gRm` renames a remote. - `gRm` renames a remote.
- `gRu` fetches remotes updates. - `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. - `gRs` displays information about a given remote.
- `gRb` opens a remote on [GitHub][3] in the default browser. - `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. - `gsa` applies the changes recorded in a stash to the working directory.
- `gsx` drops a stashed state. - `gsx` drops a stashed state.
- `gsX` drops all the stashed states. - `gsX` drops all the stashed states.
- `gsd` lists dropped stashed states.
- `gsl` lists stashed states. - `gsl` lists stashed states.
- `gsL` displays the changes recorded in the stash as a diff between the - `gsL` lists dropped stashed states.
stashed state and its original parent. - `gsd` displays changes between the stash and its original parent.
- `gsp` removes and applies a single stashed state from the stash list. - `gsp` removes and applies a single stashed state from the stash list.
- `gsr` recovers a given stashed state. - `gsr` recovers a given stashed state.
- `gss` stashes the changes of the dirty working directory, including untracked. - `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 | Name | Format Code | Description
| --------- | :---------: | --------------------------------------------------- | --------- | :---------: | ---------------------------------------------------
| action | %s | Special action name | action | %s | Special action name
| added | %a | Added files count
| ahead | %A | Commits ahead of remote count | ahead | %A | Commits ahead of remote count
| behind | %B | Commits behind of remote count | behind | %B | Commits behind of remote count
| branch | %b | Branch name | branch | %b | Branch name
| commit | %c | Commit hash | 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 | clean | %C | Clean state
| deleted | %d | Deleted files count | deleted | %d | Deleted files count
| dirty | %D | Dirty files count | dirty | %D | Dirty files count
| modified | %m | Modified files count | modified | %m | Modified files count
| position | %p | Commits from the nearest tag count
| remote | %R | Remote name
| renamed | %r | Renamed files count | renamed | %r | Renamed files count
| stashed | %S | Stashed states count
| unmerged | %U | Unmerged files count | unmerged | %U | Unmerged files count
| untracked | %u | Untracked files count | untracked | %u | Untracked files count


Expand Down

0 comments on commit a19cdee

Please sign in to comment.