From 16eceabb032d25404469bce138cfb18a417dd1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Suarez=20Ordo=C3=B1ez?= Date: Sat, 4 May 2013 18:20:26 -0700 Subject: [PATCH] adding zaw as an external module --- .gitmodules | 3 +++ modules/zaw/README.md | 34 ++++++++++++++++++++++++++++++++++ modules/zaw/external | 1 + modules/zaw/init.zsh | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 70 insertions(+) create mode 100644 modules/zaw/README.md create mode 160000 modules/zaw/external create mode 100644 modules/zaw/init.zsh diff --git a/.gitmodules b/.gitmodules index 7a7a7b5e..a1fb1cf6 100644 --- a/.gitmodules +++ b/.gitmodules @@ -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 diff --git a/modules/zaw/README.md b/modules/zaw/README.md new file mode 100644 index 00000000..42c8f29f --- /dev/null +++ b/modules/zaw/README.md @@ -0,0 +1,34 @@ +Zaw +=== + +Loads and configures Zaw from the [zsh-users/zaw][1] project. + +Styles +====== + +``` +':prezto:module:zaw:filter-select:highlight' selected +':prezto:module:zaw:filter-select:highlight' matched +':prezto:module:zaw:filter-select:highlight' title +``` + +Bindings +======== + +To use zaw as your default history search. Add the following to your .zpreztorc: + +``` +zstyle ':prezto:module:zaw' default-history-search 'yes' +``` + +More details can be found on the [zsh-users/zaw][1] project's Readme. + +Authors +------- + +*The authors of this module should be contacted via the [issue tracker][2].* + + - [Santiago Suarez Ordoñez](https://github.com/santiycr) + +[1]: https://github.com/zsh-users/zaw +[2]: https://github.com/sorin-ionescu/prezto/issues diff --git a/modules/zaw/external b/modules/zaw/external new file mode 160000 index 00000000..d0f60320 --- /dev/null +++ b/modules/zaw/external @@ -0,0 +1 @@ +Subproject commit d0f603203b23cf30050c6597559d6b5a6336d92f diff --git a/modules/zaw/init.zsh b/modules/zaw/init.zsh new file mode 100644 index 00000000..bc416f10 --- /dev/null +++ b/modules/zaw/init.zsh @@ -0,0 +1,32 @@ +# +# Loads zaw plugin in prezto +# +# Authors: +# Santiago Suarez Ordoñez +# + +# Source plugin file. +source "${0:h}/external/zaw.zsh" + +# Add custom shortcuts. +if zstyle -t ':prezto:module:zaw' default-history-search; then + bindkey '^R' zaw-history +fi + +# Setup custom syntax highlighting. +zstyle -s ':prezto:module:zaw:filter-select:highlight' selected 'SELECTED' \ + || SELECTED='fg=blue,underline' + zstyle ':filter-select:highlight' selected "$SELECTED" + +zstyle -s ':prezto:module:zaw:filter-select:highlight' matched 'MATCHED' \ + || MATCHED='fg=yellow' + zstyle ':filter-select:highlight' matched "$MATCHED" || 'fg=yellow' + +zstyle -s ':prezto:module:zaw:filter-select:highlight' title 'TITLE' \ + || TITLE='fg=yellow,underline' +zstyle ':filter-select:highlight' title "$TITLE" + +zstyle ':filter-select' max-lines 15 +zstyle ':filter-select' rotate-list yes +zstyle ':filter-select' case-insensitive yes +zstyle ':filter-select' extended-search yes