cfac963772718723589bf7293be0a53f79511b24
- Author
- L.C. Karssen <lennart@karssen.org>
- Committer
- L.C. Karssen <lennart@karssen.org>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/README.markdown b/README.markdown
2index 33128ef973025d1040cd2f1e8341a900677bbe38..843c0c6ba0b8bc1cfd72ac9ef0a97d57f9322b13 100644
3--- a/README.markdown
4+++ b/README.markdown
5@@ -1,21 +1,21 @@
6-
7-
8+<p align="center">
9+ <img src="https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png" alt="Oh My Zsh">
10+</p>
11
12 Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration. That sounds boring. Let's try this again.
13
14diff --git a/lib/git.zsh b/lib/git.zsh
15index de51daafac8978eacd8ba37671cd71e3b90209db..f91b516bd38aafcf33e0b9b133381b78c2288fe1 100644
16--- a/lib/git.zsh
17+++ b/lib/git.zsh
18@@ -37,7 +37,9 @@ function git_remote_status() {
19 ahead=$(command git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
20 behind=$(command git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
21
22- if [[ $ahead -gt 0 ]] && [[ $behind -eq 0 ]]; then
23+ if [[ $ahead -eq 0 ]] && [[ $behind -eq 0 ]]; then
24+ git_remote_status="$ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE"
25+ elif [[ $ahead -gt 0 ]] && [[ $behind -eq 0 ]]; then
26 git_remote_status="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
27 git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}"
28 elif [[ $behind -gt 0 ]] && [[ $ahead -eq 0 ]]; then
29diff --git a/plugins/brew/_brew b/plugins/brew/_brew
30index 4c99a383ae237077bf0a5f9241a6aa7fddba2ee7..1f24bd67b10576067d7dd8d1aa2bc299dfafe103 100644
31--- a/plugins/brew/_brew
32+++ b/plugins/brew/_brew
33@@ -1,7 +1,13 @@
34 #compdef brew
35 #autoload
36
37-# imported from the latest homebrew contributions
38+# imported from https://github.com/Homebrew/homebrew/blob/29f73d2212c2b202fe25f69dcbf440d8391fa4c9/Library/Contributions/brew_zsh_completion.zsh
39+
40+# Brew ZSH completion function
41+# Drop this somewhere in your $fpath (like /usr/share/zsh/site-functions)
42+# and rename it _brew
43+#
44+# altered from _fink
45
46 _brew_all_formulae() {
47 formulae=(`brew search`)
48@@ -15,6 +21,14 @@ _brew_installed_taps() {
49 installed_taps=(`brew tap`)
50 }
51
52+_brew_official_taps() {
53+ official_taps=(`brew tap --list-official`)
54+}
55+
56+_brew_pinned_taps() {
57+ pinned_taps=(`brew tap --list-pinned`)
58+}
59+
60 _brew_outdated_formulae() {
61 outdated_formulae=(`brew outdated`)
62 }
63@@ -25,8 +39,10 @@ _1st_arguments=(
64 'cat:display formula file for a formula'
65 'cleanup:uninstall unused and old versions of packages'
66 'commands:show a list of commands'
67+ 'config:show homebrew and system configuration'
68 'create:create a new formula'
69- 'deps:list dependencies of a formula'
70+ 'deps:list dependencies and dependants of a formula'
71+ 'desc:display a description of a formula'
72 'doctor:audits your installation for common issues'
73 'edit:edit a formula'
74 'fetch:download formula resources to the cache'
75@@ -37,40 +53,45 @@ _1st_arguments=(
76 'reinstall:install a formula anew; re-using its current options'
77 'leaves:show installed formulae that are not dependencies of another installed formula'
78 'link:link a formula'
79+ 'linkapps:symlink .app bundles provided by formulae into /Applications'
80 'list:list files in a formula or not-installed formulae'
81 'log:git commit log for a formula'
82 'missing:check all installed formuale for missing dependencies.'
83+ 'migrate:migrate renamed formula to new name'
84 'outdated:list formulae for which a newer version is available'
85 'pin:pin specified formulae'
86 'postinstall:perform post_install for a given formula'
87 'prune:remove dead links'
88 'remove:remove a formula'
89 'search:search for a formula (/regex/ or string)'
90- 'switch:switch linkage between installed versions of a formula'
91+ 'switch:switch between different versions of a formula'
92 'tap:tap a new formula repository from GitHub, or list existing taps'
93+ 'tap-info:information about a tap'
94+ 'tap-pin:pin a tap'
95+ 'tap-unpin:unpin a tap'
96 'test-bot:test a formula and build a bottle'
97 'uninstall:uninstall a formula'
98 'unlink:unlink a formula'
99+ 'unlinkapps:remove symlinked .app bundles provided by formulae from /Applications'
100 'unpin:unpin specified formulae'
101 'untap:remove a tapped repository'
102- 'update:pull latest repository'
103+ 'update:fetch latest version of Homebrew and all formulae'
104 'upgrade:upgrade outdated formulae'
105 'uses:show formulae which depend on a formula'
106+ `brew commands --quiet --include-aliases`
107 )
108
109 local expl
110-local -a formulae installed_formulae installed_taps outdated_formulae
111+local -a formulae installed_formulae installed_taps official_taps outdated_formulae
112
113 _arguments \
114 '(-v)-v[verbose]' \
115 '(--cellar)--cellar[brew cellar]' \
116- '(--config)--config[brew configuration]' \
117 '(--env)--env[brew environment]' \
118 '(--repository)--repository[brew repository]' \
119 '(--version)--version[version information]' \
120 '(--prefix)--prefix[where brew lives on this system]' \
121 '(--cache)--cache[brew cache]' \
122- '(--force)--force[brew force]' \
123 '*:: :->subcmds' && return 0
124
125 if (( CURRENT == 1 )); then
126@@ -79,9 +100,18 @@ if (( CURRENT == 1 )); then
127 fi
128
129 case "$words[1]" in
130- install|reinstall|audit|home|homepage|log|info|abv|uses|cat|deps|edit|options)
131+ install|reinstall|audit|home|homepage|log|info|abv|uses|cat|deps|desc|edit|options|switch)
132 _brew_all_formulae
133diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh
134index 164b4319f34c402dfd5054e2e06060ed29fcad0f..758b4a56c0aee1081e7acc18694bd8c9408ad082 100644
135--- a/plugins/chruby/chruby.plugin.zsh
136+++ b/plugins/chruby/chruby.plugin.zsh
137@@ -16,9 +16,6 @@
138 # rvm and rbenv plugins also provide this alias
139 alias rubies='chruby'
140
141-local _chruby_path
142-local _chruby_auto
143-
144 _homebrew-installed() {
145 whence brew &> /dev/null
146 }
147@@ -42,6 +39,9 @@ if _ruby-build_installed; then
148 fi
149
150 _source_from_omz_settings() {
151+ local _chruby_path
152+ local _chruby_auto
153+
154 zstyle -s :omz:plugins:chruby path _chruby_path
155 zstyle -s :omz:plugins:chruby auto _chruby_auto
156
157diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh
158index 797554a13e3501787763a03d79e019d93f0261d9..0e2f2133f15dca6291e7ef7c6cf98370732cd534 100644
159--- a/plugins/command-not-found/command-not-found.plugin.zsh
160+++ b/plugins/command-not-found/command-not-found.plugin.zsh
161@@ -23,3 +23,11 @@ if [ -f /usr/libexec/pk-command-not-found ]; then
162 return $retval
163 }
164 fi
165+
166+# OSX command-not-found support
167+# https://github.com/Homebrew/homebrew-command-not-found
168+if type brew &> /dev/null; then
169+ if brew command command-not-found-init > /dev/null 2>&1; then
170+ eval "$(brew command-not-found-init)";
171+ fi
172+fi
173diff --git a/plugins/dnf/README.md b/plugins/dnf/README.md
174new file mode 100755
175index 0000000000000000000000000000000000000000..f9ef496fa7ec4f4fddc21960a1c5a0b2746f8b66
176--- /dev/null
177+++ b/plugins/dnf/README.md
178@@ -0,0 +1,25 @@
179+## Description
180+
181+This plugin makes `dnf` usage easier by adding aliases for the most
182+common commands.
183+
184+`dnf` is the new package manager for RPM-based distributions, which
185+replaces `yum`.
186+
187+## Aliases
188+
189+| Alias | Command | Description |
190+|-------|-------------------------|--------------------------|
191+| dnfl | `dnf list` | List packages |
192+| dnfli | `dnf list installed` | List installed packages |
193+| dnfgl | `dnf grouplist` | List package groups |
194+| dnfmc | `dnf makecache` | Generate metadata cache |
195+| dnfp | `dnf info` | Show package information |
196+| dnfs | `dnf search` | Search package |
197+| **Use `sudo`** |
198+| dnfu | `sudo dnf upgrade` | Upgrade package |
199+| dnfi | `sudo dnf install` | Install package |
200+| dnfgi | `sudo dnf groupinstall` | Install package group |
201+| dnfr | `sudo dnf remove` | Remove package |
202+| dnfgr | `sudo dnf groupremove` | Remove package group |
203+| dnfc | `sudo dnf clean all` | Clean cache |
204diff --git a/plugins/dnf/dnf.plugin.zsh b/plugins/dnf/dnf.plugin.zsh
205new file mode 100644
206index 0000000000000000000000000000000000000000..653ce7dda0446975140f9c4da3df67a78b28b7f8
207--- /dev/null
208+++ b/plugins/dnf/dnf.plugin.zsh
209@@ -0,0 +1,15 @@
210+## Aliases
211+
212+alias dnfl="dnf list" # List packages
213+alias dnfli="dnf list installed" # List installed packages
214+alias dnfgl="dnf grouplist" # List package groups
215+alias dnfmc="dnf makecache" # Generate metadata cache
216+alias dnfp="dnf info" # Show package information
217+alias dnfs="dnf search" # Search package
218+
219+alias dnfu="sudo dnf upgrade" # Upgrade package
220+alias dnfi="sudo dnf install" # Install package
221+alias dnfgi="sudo dnf groupinstall" # Install package group
222+alias dnfr="sudo dnf remove" # Remove package
223+alias dnfgr="sudo dnf groupremove" # Remove package group
224+alias dnfc="sudo dnf clean all" # Clean cache
225diff --git a/plugins/encode64/encode64.plugin.zsh b/plugins/encode64/encode64.plugin.zsh
226index 53de6478a3deac691764c6832b03bc2795f60d47..979e067429873d610d0f0878c28fbf0eec48d9cf 100644
227--- a/plugins/encode64/encode64.plugin.zsh
228+++ b/plugins/encode64/encode64.plugin.zsh
229@@ -1,4 +1,17 @@
230-encode64(){ printf '%s' $1 | base64 }
231-decode64(){ printf '%s' $1 | base64 --decode }
232+encode64() {
233+ if [[ $# -eq 0 ]]; then
234+ cat | base64
235+ else
236+ printf '%s' $1 | base64
237+ fi
238+}
239+
240+decode64() {
241+ if [[ $# -eq 0 ]]; then
242+ cat | base64 --decode
243+ else
244+ printf '%s' $1 | base64 --decode
245+ fi
246+}
247 alias e64=encode64
248 alias d64=decode64
249diff --git a/plugins/forklift/README.md b/plugins/forklift/README.md
250index b452a357cd60026c15fbb47daeb9f97b300bb749..6c5cbab23ae4208878cd932c70fd4ef1af7a3b77 100644
251--- a/plugins/forklift/README.md
252+++ b/plugins/forklift/README.md
253@@ -4,10 +4,12 @@ Plugin for ForkLift, an FTP application for OS X.
254
255 ### Requirements
256
257-* [ForkLift](http://forkliftapp.com/forklift/)
258+* [ForkLift](http://www.binarynights.com/forklift/)
259
260 ### Usage
261
262-* If `fl` is called without arguments then the current folder is opened in ForkLift. Is equivalent to `fl .`
263+<code>fl [*file_or_folder*]</code>
264
265-* If `fl` is called with a directory as the argument, then that directory is opened in ForkLift
266+* If `fl` is called without arguments then the current folder is opened in ForkLift. This is equivalent to `fl .`.
267+
268+* If `fl` is called with a directory as the argument, then that directory is opened in ForkLift. If called with a non-directory file as the argument, then the file's parent directory is opened.
269diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md
270index d0bc5589f742e2dd3081242f2811b69d0571bff4..4d956e38f8dc498a5596aa2dd0013085d54c8100 100644
271--- a/plugins/frontend-search/README.md
272+++ b/plugins/frontend-search/README.md
273@@ -38,7 +38,7 @@ Available search contexts are:
274 | bootsnipp | `http://bootsnipp.com/search?q=` |
275 | caniuse | `http://caniuse.com/#search=` |
276 | codepen | `http://codepen.io/search?q=` |
277-| compass | `http://compass-style.org/search?q=` |
278+| compassdoc | `http://compass-style.org/search?q=` |
279 | cssflow | `http://www.cssflow.com/search?q=` |
280 | dartlang | `https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:` |
281 | emberjs | `http://emberjs.com/api/#stp=1&stq=` |
282diff --git a/plugins/frontend-search/_frontend-search.sh b/plugins/frontend-search/_frontend-search.sh
283index b12f829a1c58e52388c7a613b9569ec7406ce3cf..9aad76f762d6c6201cb65d8b66479588f19fe944 100644
284--- a/plugins/frontend-search/_frontend-search.sh
285+++ b/plugins/frontend-search/_frontend-search.sh
286@@ -19,7 +19,7 @@ function _frontend() {
287 commands=(
288 'jquery: Search in jQuery website'
289 'mdn: Search in MDN website'
290- 'compass: Search in COMPASS website'
291+ 'compassdoc: Search in COMPASS website'
292 'html5please: Search in HTML5 Please website'
293 'caniuse: Search in Can I Use website'
294 'aurajs: Search in AuraJs website'
295@@ -57,7 +57,7 @@ function _frontend() {
296 mdn)
297 _describe -t points "Warp points" frontend_points && ret=0
298 ;;
299- compass)
300+ compassdoc)
301 _describe -t points "Warp points" frontend_points && ret=0
302 ;;
303 html5please)
304diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh
305index 2fd5416b3c032aaab73f1ea780aa717881ddb680..3fd49ab8e8a57a15824fca3b52c5967c7e452ee3 100644
306--- a/plugins/frontend-search/frontend-search.plugin.zsh
307+++ b/plugins/frontend-search/frontend-search.plugin.zsh
308@@ -4,7 +4,7 @@ alias bem='frontend bem'
309 alias bootsnipp='frontend bootsnipp'
310 alias caniuse='frontend caniuse'
311 alias codepen='frontend codepen'
312-alias compass='frontend compass'
313+alias compassdoc='frontend compassdoc'
314 alias cssflow='frontend cssflow'
315 alias dartlang='frontend dartlang'
316 alias emberjs='frontend emberjs'
317@@ -32,7 +32,7 @@ function frontend() {
318 bootsnipp 'http://bootsnipp.com/search?q='
319 caniuse 'http://caniuse.com/#search='
320 codepen 'http://codepen.io/search?q='
321- compass 'http://compass-style.org/search?q='
322+ compassdoc 'http://compass-style.org/search?q='
323 cssflow 'http://www.cssflow.com/search?q='
324 dartlang 'https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:'
325 emberjs 'http://emberjs.com/api/#stp=1&stq='
326@@ -57,7 +57,7 @@ function frontend() {
327 print -P "%Uterm%u and what follows is what will be searched for in the %Ucontext%u website,"
328 print -P "and %Ucontext%u is one of the following:"
329 print -P ""
330- print -P " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compass, cssflow,"
331+ print -P " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow,"
332 print -P " dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs,"
333 print -P " qunit, reactjs, smacss, stackoverflow, unheap"
334 print -P ""
335@@ -73,7 +73,7 @@ function frontend() {
336 echo ""
337 echo "Valid contexts are:"
338 echo ""
339- echo " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compass, cssflow, "
340+ echo " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow, "
341 echo " dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs, "
342 echo " qunit, reactjs, smacss, stackoverflow, unheap"
343 echo ""
344diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
345index b851fb97da21d524c8f13543b773ab704ff02e2c..4291da7bac4b1a1870e99391bf8c895b06b1c660 100644
346--- a/plugins/git/git.plugin.zsh
347+++ b/plugins/git/git.plugin.zsh
348@@ -213,7 +213,5 @@ alias gup='git pull --rebase'
349 alias gupv='git pull --rebase -v'
350 alias glum='git pull upstream master'
351
352-alias gvt='git verify-tag'
353-
354 alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
355 alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit -m "--wip--"'
356diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh
357index 481d487bad12cf9e39fd3cf01d41234e17f94648..ba1b38711b8cda436ab91a177e4846b45c7189ca 100644
358--- a/plugins/gitignore/gitignore.plugin.zsh
359+++ b/plugins/gitignore/gitignore.plugin.zsh
360@@ -1,4 +1,4 @@
361-function gi() { curl -sL https://www.gitignore.io/api/$@ ;}
362+function gi() { curl -sL https://www.gitignore.io/api/${(j:,:)@} }
363
364 _gitignoreio_get_command_list() {
365 curl -sL https://www.gitignore.io/api/list | tr "," "\n"
366diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
367index 865b1523533b7ac209c4ec2a0803ff826a47f76d..8324c495ba9b9637c8c98947e7a4ffceac120883 100644
368--- a/plugins/mvn/mvn.plugin.zsh
369+++ b/plugins/mvn/mvn.plugin.zsh
370@@ -1,24 +1,24 @@
371 # mvn-color based on https://gist.github.com/1027800
372-export BOLD=`tput bold`
373-export UNDERLINE_ON=`tput smul`
374-export UNDERLINE_OFF=`tput rmul`
375-export TEXT_BLACK=`tput setaf 0`
376-export TEXT_RED=`tput setaf 1`
377-export TEXT_GREEN=`tput setaf 2`
378-export TEXT_YELLOW=`tput setaf 3`
379-export TEXT_BLUE=`tput setaf 4`
380-export TEXT_MAGENTA=`tput setaf 5`
381-export TEXT_CYAN=`tput setaf 6`
382-export TEXT_WHITE=`tput setaf 7`
383-export BACKGROUND_BLACK=`tput setab 0`
384-export BACKGROUND_RED=`tput setab 1`
385-export BACKGROUND_GREEN=`tput setab 2`
386-export BACKGROUND_YELLOW=`tput setab 3`
387-export BACKGROUND_BLUE=`tput setab 4`
388-export BACKGROUND_MAGENTA=`tput setab 5`
389-export BACKGROUND_CYAN=`tput setab 6`
390-export BACKGROUND_WHITE=`tput setab 7`
391-export RESET_FORMATTING=`tput sgr0`
392+BOLD=`tput bold`
393+UNDERLINE_ON=`tput smul`
394+UNDERLINE_OFF=`tput rmul`
395+TEXT_BLACK=`tput setaf 0`
396+TEXT_RED=`tput setaf 1`
397+TEXT_GREEN=`tput setaf 2`
398+TEXT_YELLOW=`tput setaf 3`
399+TEXT_BLUE=`tput setaf 4`
400+TEXT_MAGENTA=`tput setaf 5`
401+TEXT_CYAN=`tput setaf 6`
402+TEXT_WHITE=`tput setaf 7`
403+BACKGROUND_BLACK=`tput setab 0`
404+BACKGROUND_RED=`tput setab 1`
405+BACKGROUND_GREEN=`tput setab 2`
406+BACKGROUND_YELLOW=`tput setab 3`
407+BACKGROUND_BLUE=`tput setab 4`
408+BACKGROUND_MAGENTA=`tput setab 5`
409+BACKGROUND_CYAN=`tput setab 6`
410+BACKGROUND_WHITE=`tput setab 7`
411+RESET_FORMATTING=`tput sgr0`
412
413
414 # Wrapper function for Maven's mvn command.
415diff --git a/plugins/pylint/pylint.plugin.zsh b/plugins/pylint/pylint.plugin.zsh
416index 6760c67b080ec98f6d58f1ab8a7bbbe8e8ab4db3..57c7c0ac57af9c6108487bded1d7a0d7d79fb2a9 100644
417--- a/plugins/pylint/pylint.plugin.zsh
418+++ b/plugins/pylint/pylint.plugin.zsh
419@@ -1,3 +1,3 @@
420 # Aliases
421-alias pylint-quick='pylint --reports=n --include-ids=y'
422-compdef _pylint-quick pylint-quick='pylint --reports=n --include-ids=y'
423+alias pylint-quick='pylint --reports=n'
424+compdef _pylint-quick pylint-quick='pylint --reports=n'
425diff --git a/plugins/vault/README.md b/plugins/vault/README.md
426new file mode 100644
427index 0000000000000000000000000000000000000000..0f61c9410a633f90a8ecc98c55a823839b7c5037
428--- /dev/null
429+++ b/plugins/vault/README.md
430@@ -0,0 +1,18 @@
431+## Vault (https://www.vaultproject.io) autocomplete plugin
432+
433+- Adds autocomplete options for all vault commands.
434+
435+####Show help for all commands
436+
437+
438+
439+####Create new Vault token
440+
441+
442+
443+####Enable audit backends
444+
445+
446+
447+
448+Crafted with <3 by Valentin Bud ([@valentinbud](https://twitter.com/valentinbud))
449diff --git a/plugins/vault/_vault b/plugins/vault/_vault
450new file mode 100644
451index 0000000000000000000000000000000000000000..c5338dffa2786bfa73d83043de3e6541d0cbd482
452--- /dev/null
453+++ b/plugins/vault/_vault
454@@ -0,0 +1,400 @@
455+#compdef vault
456+
457+typeset -a main_args
458+main_args=(
459+ '(-version)-version[Prints the Vault version]'
460+ '(-help)-help[Prints Vault Help]'
461+)
462+
463+typeset -a general_args
464+general_args=(
465+ '(-help)-help[Prints Help]'
466+ '(-address)-address=-[The address of the Vault server. Overrides the VAULT_ADDR environment variable if set.]:address:'
467+ '(-ca-cert)-ca-cert=-[Path to a PEM encoded CA cert file to use to verify the Vault server SSL certificate. Overrides the VAULT_CACERT environment variable if set.]:file:_files -g "*.pem"'
468diff --git a/plugins/zsh-navigation-tools/.config/znt/n-cd.conf b/plugins/zsh-navigation-tools/.config/znt/n-cd.conf
469index f8c49bfac019be65fe66524dcbceadc04fa2c8aa..7ed7828ea4f352a13c959f2e0a25e9f6cd04fb89 100644
470--- a/plugins/zsh-navigation-tools/.config/znt/n-cd.conf
471+++ b/plugins/zsh-navigation-tools/.config/znt/n-cd.conf
472@@ -1,4 +1,5 @@
473 # Hotlist
474+# Try to use $ZSH_VERSION, e.g. /usr/share/zsh/$ZSH_VERSION/functions
475 local hotlist
476 hotlist=(
477 ~/.config/znt
478@@ -7,7 +8,6 @@ hotlist=(
479 /usr/local/share/zsh/site-functions
480 /usr/local/share/zsh
481 /usr/local/bin
482- /usr/lib
483 )
484
485 # Suppress adding (to directory stack) directories visited by n-cd
486diff --git a/plugins/zsh-navigation-tools/README.md b/plugins/zsh-navigation-tools/README.md
487index 4420dab829b2754b3a5270746327a28f83916502..32a86bba91d0b7e7fa49a87584b7c3cd32d049b8 100644
488--- a/plugins/zsh-navigation-tools/README.md
489+++ b/plugins/zsh-navigation-tools/README.md
490@@ -25,7 +25,7 @@ widgets exist, znt-cd-widget and znt-kill-widget, they can be too assigned
491 to key combinations (no need for autoload when using Oh My Zsh):
492
493 zle -N znt-cd-widget
494- bindkey "^T" znt-cd-widget
495+ bindkey "^A" znt-cd-widget
496 zle -N znt-kill-widget
497 bindkey "^Y" znt-kill-widget
498
499diff --git a/plugins/zsh-navigation-tools/n-history b/plugins/zsh-navigation-tools/n-history
500index c9e53316beb5e0995bf22ea4134a2d7d82476e6f..9f1d6279ba62a8ab6b125be68d78948fe9345747 100644
501--- a/plugins/zsh-navigation-tools/n-history
502+++ b/plugins/zsh-navigation-tools/n-history
503@@ -42,7 +42,7 @@ if [ "$REPLY" -gt 0 ]; then
504 # ZLE?
505 if [ "${(t)CURSOR}" = "integer-local-special" ]; then
506 zle redisplay
507- zle kill-whole-line
508+ zle kill-buffer
509 zle -U "$selected"
510 else
511 print -zr "$selected"
512diff --git a/plugins/zsh-navigation-tools/n-list b/plugins/zsh-navigation-tools/n-list
513index 388712bd0ee6c32b44aced358c3c20047e3bfa60..50159b4a016ee6cc2d14fefae98defc743910b12 100644
514--- a/plugins/zsh-navigation-tools/n-list
515+++ b/plugins/zsh-navigation-tools/n-list
516@@ -1,6 +1,7 @@
517 # $1, $2, ... - elements of the list
518 # $NLIST_NONSELECTABLE_ELEMENTS - array of indexes (1-based) that cannot be selected
519 # $REPLY is the output variable - contains index (1-based) or -1 when no selection
520+# $reply (array) is the second part of the output - use the index (REPLY) to get selected element
521 #
522 # Copy this file into /usr/share/zsh/site-functions/
523 # and add 'autoload n-list` to .zshrc
524@@ -164,6 +165,7 @@ integer current_difference=0
525 local prev_search_buffer=""
526 integer prev_uniq_mode=0
527 integer prev_start_idx=-1
528+local MBEGIN MEND MATCH mbegin mend match
529
530 # Ability to remember the list between calls
531 if [[ -z "$NLIST_REMEMBER_STATE" || "$NLIST_REMEMBER_STATE" -eq 0 || "$NLIST_REMEMBER_STATE" -eq 2 ]]; then
532@@ -264,11 +266,15 @@ while (( 1 )); do
533 local search_pattern=""
534 local colsearch_pattern=""
535 if [ -n "$search_buffer" ]; then
536- # Patterns will be *foo*~^*bar* and foo|bar)
537+ # Patterns will be *foo*~^*bar* and (foo|bar)
538 search_pattern="${search_buffer// ##/*~^*}"
539 colsearch_pattern="${search_buffer// ##/|}"
540
541- list=( "${(@M)list:#(#i)*$~search_pattern*}" )
542+ # The repeat will make the matching work on a fresh heap
543+ repeat 1; do
544+ list=( "${(@M)list:#(#i)*$~search_pattern*}" )
545+ done
546+
547 last_element="$#list"
548 fi
549
550@@ -287,7 +293,10 @@ while (( 1 )); do
551
552 if [ -n "$colsearch_pattern" ]; then
553 local red=$'\x1b[00;31m' reset=$'\x1b[00;00m'
554- disp_list=( "${(@)disp_list//(#mi)($~colsearch_pattern)/$red${MATCH}$reset}" )
555+ # The repeat will make the matching work on a fresh heap
556+ repeat 1; do
557+ disp_list=( "${(@)disp_list//(#mi)($~colsearch_pattern)/$red${MATCH}$reset}" )
558+ done
559 fi
560
561 # We have display list, lets replace newlines with "\n" when needed (1/2)
562@@ -380,7 +389,7 @@ while (( 1 )); do
563
564 # Get the special (i.e. "keypad") key or regular key
565 if [ -n "$key" ]; then
566- final_key="$key"
567+ final_key="$key"
568 elif [ -n "$keypad" ]; then
569 final_key="$keypad"
570 else
571diff --git a/plugins/zsh-navigation-tools/n-list-draw b/plugins/zsh-navigation-tools/n-list-draw
572index 1b2571fbd42f0930f47717138bc9a21c14781cd5..2f8b1d0d5838a29c6bd264633ec06ed52090e081 100644
573--- a/plugins/zsh-navigation-tools/n-list-draw
574+++ b/plugins/zsh-navigation-tools/n-list-draw
575@@ -98,7 +98,7 @@ shift 7
576 integer max_text_len=page_width-x_offset
577
578 [ "$bold" = "0" ] && bold="" || bold="+bold"
579-[[ "$active_text" = "underline" || "$active_text" = "reverse" ]] || active_text="reverse"
580+[[ "$active_text" = "underline" || "$active_text" = "reverse" ]] || local active_text="reverse"
581 # With Linux terminal underline won't work properly
582 [ "$TERM" = "linux" ] && active_text="reverse"
583
584diff --git a/plugins/zsh-navigation-tools/n-list-input b/plugins/zsh-navigation-tools/n-list-input
585index 380acdc00aeedcf3b14b4a67e7bb2dae7a116ad6..957cd5a0b134f5984d2124c52b8d564e219f2f1f 100644
586--- a/plugins/zsh-navigation-tools/n-list-input
587+++ b/plugins/zsh-navigation-tools/n-list-input
588@@ -44,7 +44,7 @@ case "$key" in
589 [ "$current_idx" -lt "$last_element" ] && current_idx=current_idx+1;
590 _nlist_compute_first_to_show_idx
591 ;;
592- (PPAGE)
593+ (PPAGE|$'\b'|$'\C-?'|BACKSPACE)
594 current_idx=current_idx-page_height
595 [ "$current_idx" -lt 1 ] && current_idx=1;
596 _nlist_compute_first_to_show_idx
597@@ -72,7 +72,7 @@ case "$key" in
598 current_idx=last_element
599 _nlist_compute_first_to_show_idx
600 ;;
601- ($'\n')
602+ ($'\n'|ENTER)
603 # Is that element selectable?
604 # Check for this only when there is no search
605 if [[ "$NLIST_SEARCH_BUFFER" != "" || "$NLIST_IS_UNIQ_MODE" -eq 1 ||
606@@ -137,7 +137,7 @@ esac
607 else
608
609 case "$key" in
610- ($'\n')
611+ ($'\n'|ENTER)
612 search=0
613 _nlist_cursor_visibility 0
614 ;;
615diff --git a/plugins/zsh-navigation-tools/znt-history-widget b/plugins/zsh-navigation-tools/znt-history-widget
616index 9ddae606d9163f7e4b61f048909fcd3854919698..a4a26cbfcb6005759584abfe019c6b908c1be647 100644
617--- a/plugins/zsh-navigation-tools/znt-history-widget
618+++ b/plugins/zsh-navigation-tools/znt-history-widget
619@@ -1,7 +1,11 @@
620 autoload znt-usetty-wrapper n-history
621 local NLIST_START_IN_SEARCH_MODE=1
622 local NLIST_START_IN_UNIQ_MODE=1
623-local NLIST_SET_SEARCH_TO="$BUFFER"
624+
625+# Only if current $BUFFER doesn't come from history
626+if [ "$HISTCMD" = "$HISTNO" ]; then
627+ local NLIST_SET_SEARCH_TO="$BUFFER"
628+fi
629
630 znt-usetty-wrapper n-history "$@"
631
632diff --git a/themes/robbyrussell.zsh-theme b/themes/robbyrussell.zsh-theme
633index 24e1e8c5228bc479bab92c8c2fe955b2f53ad845..f9eca6a87092dc0f9e918821870341e281cf1f01 100644
634--- a/themes/robbyrussell.zsh-theme
635+++ b/themes/robbyrussell.zsh-theme
636@@ -1,7 +1,7 @@
637-local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)"
638-PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
639+local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"
640+PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
641
642-ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}"
643-ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
644-ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}"
645+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}git:(%{$fg[red]%}"
646+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
647+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗"
648 ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})"