mirror of
				https://github.com/dcarrillo/prezto.git
				synced 2025-11-04 06:19:09 +00:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			pull/563-c
			...
			module/zaw
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					8e95c547d6 | ||
| 
						 | 
					36ade25eb6 | 
							
								
								
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								.gitmodules
									
									
									
									
										vendored
									
									
								
							@@ -7,3 +7,6 @@
 | 
			
		||||
[submodule "modules/completion/external"]
 | 
			
		||||
	path = modules/completion/external
 | 
			
		||||
	url = https://github.com/zsh-users/zsh-completions.git
 | 
			
		||||
[submodule "modules/zaw/external"]
 | 
			
		||||
	path = modules/zaw/external
 | 
			
		||||
	url = git://github.com/zsh-users/zaw.git
 | 
			
		||||
 
 | 
			
		||||
@@ -193,3 +193,8 @@ Yum
 | 
			
		||||
 | 
			
		||||
Defines yum aliases.
 | 
			
		||||
 | 
			
		||||
Zaw
 | 
			
		||||
---
 | 
			
		||||
 | 
			
		||||
Integrates zaw into Prezto.
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -57,17 +57,6 @@ key_info=(
 | 
			
		||||
  'BackTab'   "$terminfo[kcbt]"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# Escape sequences from Debian's inputrc.
 | 
			
		||||
key_info+=(
 | 
			
		||||
  'ControlLeft' '\e[1;5D \e[5D \e\e[D \eOd'
 | 
			
		||||
  'ControlRight' '\e[1;5C \e[5C \e\e[C \eOc'
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
# if [[ "$TERM" == rxvt* ]]; then
 | 
			
		||||
#   key_info[ControlLeft]+=' \eOd'
 | 
			
		||||
#   key_info[ControlRight]+=' \eOc'
 | 
			
		||||
# fi
 | 
			
		||||
 | 
			
		||||
# Set empty $key_info values to an invalid UTF-8 sequence to induce silent
 | 
			
		||||
# bindkey failure.
 | 
			
		||||
for key in "${(k)key_info[@]}"; do
 | 
			
		||||
@@ -217,10 +206,10 @@ bindkey -d
 | 
			
		||||
# Emacs Key Bindings
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
for key in "$key_info[Escape]"{B,b} "${(s: :)key_info[ControlLeft]}"
 | 
			
		||||
  bindkey -M emacs "$key" emacs-backward-word
 | 
			
		||||
for key in "$key_info[Escape]"{F,f} "${(s: :)key_info[ControlRight]}"
 | 
			
		||||
  bindkey -M emacs "$key" emacs-forward-word
 | 
			
		||||
for key ("$key_info[Escape]"{B,b}) bindkey -M emacs "$key" emacs-backward-word
 | 
			
		||||
for key ("$key_info[Escape]"{F,f}) bindkey -M emacs "$key" emacs-forward-word
 | 
			
		||||
bindkey -M emacs "$key_info[Escape]$key_info[Left]" emacs-backward-word
 | 
			
		||||
bindkey -M emacs "$key_info[Escape]$key_info[Right]" emacs-forward-word
 | 
			
		||||
 | 
			
		||||
# Kill to the beginning of the line.
 | 
			
		||||
for key in "$key_info[Escape]"{K,k}
 | 
			
		||||
 
 | 
			
		||||
@@ -72,7 +72,7 @@ alias pacman-remove-orphans="${_pacman_sudo}${_pacman_frontend} --remove --recur
 | 
			
		||||
# Synchronizes the local package and Arch Build System databases against the
 | 
			
		||||
# repositories.
 | 
			
		||||
if (( $+commands[abs] )); then
 | 
			
		||||
  alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh && ${_pacman_sudo}abs"
 | 
			
		||||
  alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh && sudo abs"
 | 
			
		||||
else
 | 
			
		||||
  alias pacu="${_pacman_sudo}${_pacman_frontend} --sync --refresh"
 | 
			
		||||
fi
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										77
									
								
								modules/zaw/README.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										77
									
								
								modules/zaw/README.md
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,77 @@
 | 
			
		||||
Zaw
 | 
			
		||||
===
 | 
			
		||||
 | 
			
		||||
Loads and configures Zaw from the [zaw][1] project.
 | 
			
		||||
 | 
			
		||||
Contributors
 | 
			
		||||
------------
 | 
			
		||||
 | 
			
		||||
New features and bug fixes should be submitted to the [zaw][1] project according
 | 
			
		||||
to its rules and regulations. This module will be synchronized against it.
 | 
			
		||||
 | 
			
		||||
Settings
 | 
			
		||||
--------
 | 
			
		||||
 | 
			
		||||
### Case Sensitivity
 | 
			
		||||
 | 
			
		||||
To enable case-sensitivity for this module only, add the following line to
 | 
			
		||||
*zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:zaw' case-sensitive 'yes'
 | 
			
		||||
 | 
			
		||||
### Highlighting
 | 
			
		||||
 | 
			
		||||
If colors are enabled, *zaw* will automatically highlight positive results.
 | 
			
		||||
 | 
			
		||||
To enable highlighting for this module only, add the following line to
 | 
			
		||||
*zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:zaw' color 'yes'
 | 
			
		||||
 | 
			
		||||
To change the error color, add the following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:zaw:color' error 'bg=red,fg=white'
 | 
			
		||||
 | 
			
		||||
To change the marked item color, add the following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:zaw:color' marked 'bg=blue,fg=white'
 | 
			
		||||
 | 
			
		||||
To change the matched item color, add the following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:zaw:color' matched 'bg=magenta,fg=white'
 | 
			
		||||
 | 
			
		||||
To change the selected item color, add the following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:zaw:color' selected 'standout'
 | 
			
		||||
 | 
			
		||||
To change the list title color, add the following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:zaw:color' title 'fg=yellow'
 | 
			
		||||
 | 
			
		||||
# Search
 | 
			
		||||
 | 
			
		||||
To set the maximum number of items, add the following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:zaw' max-lines 15
 | 
			
		||||
 | 
			
		||||
To rotate to the other side of the list when the cursor reaches the top or the
 | 
			
		||||
bottom, add the following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':filter-select' rotate-list 'yes'
 | 
			
		||||
 | 
			
		||||
To use extended search operators, add the following line to *zpreztorc*:
 | 
			
		||||
 | 
			
		||||
    zstyle ':prezto:module:zaw' extended-search 'yes'
 | 
			
		||||
 | 
			
		||||
More details can be found in the [zaw][1] project's README.
 | 
			
		||||
 | 
			
		||||
Authors
 | 
			
		||||
-------
 | 
			
		||||
 | 
			
		||||
*The authors of this module should be contacted via the [issue tracker][2].*
 | 
			
		||||
 | 
			
		||||
  - [Sorin Ionescu](https://github.com/sorin-ionescu)
 | 
			
		||||
 | 
			
		||||
[1]: https://github.com/zsh-users/zaw
 | 
			
		||||
[2]: https://github.com/sorin-ionescu/prezto/issues
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										1
									
								
								modules/zaw/external
									
									
									
									
									
										Submodule
									
								
							
							
								
								
								
								
								
							
						
						
									
										1
									
								
								modules/zaw/external
									
									
									
									
									
										Submodule
									
								
							 Submodule modules/zaw/external added at c3308b675d
									
								
							
							
								
								
									
										69
									
								
								modules/zaw/init.zsh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										69
									
								
								modules/zaw/init.zsh
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,69 @@
 | 
			
		||||
#
 | 
			
		||||
# Integrates zaw into Prezto.
 | 
			
		||||
#
 | 
			
		||||
# Authors:
 | 
			
		||||
#   Sorin Ionescu <sorin.ionescu@gmail.com>
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Load dependencies.
 | 
			
		||||
pmodload 'editor'
 | 
			
		||||
 | 
			
		||||
# Source module files.
 | 
			
		||||
source "${0:h}/external/zaw.zsh" || return 1
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Highlighting
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
zstyle -s ':prezto:module:zaw:color' error 'REPLY' || REPLY='bg=red,fg=white'
 | 
			
		||||
zstyle ':filter-select:highlight' error "$REPLY"
 | 
			
		||||
 | 
			
		||||
zstyle -s ':prezto:module:zaw:color' marked 'REPLY' || REPLY='bg=blue,fg=white'
 | 
			
		||||
zstyle ':filter-select:highlight' marked "$REPLY"
 | 
			
		||||
 | 
			
		||||
zstyle -s ':prezto:module:zaw:color' matched 'REPLY' || REPLY='bg=magenta,fg=white'
 | 
			
		||||
zstyle ':filter-select:highlight' matched "$REPLY"
 | 
			
		||||
 | 
			
		||||
zstyle -s ':prezto:module:zaw:color' selected 'REPLY' || REPLY='standout'
 | 
			
		||||
zstyle ':filter-select:highlight' selected "$REPLY"
 | 
			
		||||
 | 
			
		||||
zstyle -s ':prezto:module:zaw:color' title 'REPLY' || REPLY='fg=yellow'
 | 
			
		||||
zstyle ':filter-select:highlight' title "$REPLY"
 | 
			
		||||
 | 
			
		||||
if ! zstyle -t ':prezto:module:zaw' color; then
 | 
			
		||||
  for style in error marked matched selected title; do
 | 
			
		||||
    zstyle -d ':filter-select:highlight' "$style"
 | 
			
		||||
  done
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Search
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
zstyle -s ':prezto:module:zaw' max-lines 'REPLY' || REPLY=0
 | 
			
		||||
zstyle ':filter-select' max-lines "$REPLY"
 | 
			
		||||
 | 
			
		||||
zstyle -b ':filter-select' rotate-list 'REPLY' || REPLY='no'
 | 
			
		||||
zstyle ':filter-select' rotate-list "$REPLY"
 | 
			
		||||
 | 
			
		||||
zstyle -b ':prezto:module:zaw' extended-search 'REPLY' || REPLY='no'
 | 
			
		||||
zstyle ':filter-select' extended-search "$REPLY"
 | 
			
		||||
 | 
			
		||||
if ! zstyle -t ':prezto:module:zaw' case-sensitive; then
 | 
			
		||||
  zstyle ':filter-select' case-insensitive 'yes'
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Key Bindings
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
if [[ -n "$key_info" ]]; then
 | 
			
		||||
  # Emacs
 | 
			
		||||
  bindkey -M emacs "$key_info[Control]R" zaw-history
 | 
			
		||||
  bindkey -M emacs "$key_info[Control]S" zaw-history
 | 
			
		||||
 | 
			
		||||
  # Vi
 | 
			
		||||
  bindkey -M vicmd "/" zaw-history
 | 
			
		||||
  bindkey -M vicmd "?" zaw-history
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
@@ -152,3 +152,32 @@ zstyle ':prezto:module:prompt' theme 'sorin'
 | 
			
		||||
 | 
			
		||||
# Auto start a session when Zsh is launched in a SSH connection.
 | 
			
		||||
# zstyle ':prezto:module:tmux:auto-start' remote 'yes'
 | 
			
		||||
 | 
			
		||||
#
 | 
			
		||||
# Zaw
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# Set the error color.
 | 
			
		||||
# zstyle ':prezto:module:zaw:color' error 'bg=red,fg=white'
 | 
			
		||||
 | 
			
		||||
# Set the marked item color.
 | 
			
		||||
# zstyle ':prezto:module:zaw:color' marked 'bg=blue,fg=white'
 | 
			
		||||
 | 
			
		||||
# Set the matched item color.
 | 
			
		||||
# zstyle ':prezto:module:zaw:color' matched 'bg=magenta,fg=white'
 | 
			
		||||
 | 
			
		||||
# Set the selected item color.
 | 
			
		||||
# zstyle ':prezto:module:zaw:color' selected 'standout'
 | 
			
		||||
 | 
			
		||||
# Set the list title color.
 | 
			
		||||
# zstyle ':prezto:module:zaw:color' title 'fg=yellow'
 | 
			
		||||
 | 
			
		||||
# Set the maximum number of items.
 | 
			
		||||
# zstyle ':prezto:module:zaw' max-lines 15
 | 
			
		||||
 | 
			
		||||
# Set list cursor rotation.
 | 
			
		||||
# zstyle ':filter-select' rotate-list 'yes'
 | 
			
		||||
 | 
			
		||||
# Enable extended search operators.
 | 
			
		||||
# zstyle ':prezto:module:zaw' extended-search 'yes'
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user