This repository has been archived by the owner on Jan 26, 2021. It is now read-only.
forked from sorin-ionescu/prezto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'original/master'
* original/master: (70 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 ... Conflicts: modules/ssh-agent/init.zsh
- Loading branch information
Showing
58 changed files
with
848 additions
and
620 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
modules/archive/functions/_ls-archive → modules/archive/functions/_lsarchive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> | ||
|
4 changes: 2 additions & 2 deletions
4
modules/archive/functions/_extract → modules/archive/functions/_unarchive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> | ||
|
@@ -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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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]> | ||
|
@@ -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" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 'bindings' | ||
with 'emacs' or 'vi'. | ||
|
||
zstyle ':prezto:module:editor' key-bindings 'bindings' | ||
|
||
### 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 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
||
|
@@ -340,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} | ||
|
Oops, something went wrong.