diff options
Diffstat (limited to 'plugins/zsh-navigation-tools/README.md')
-rw-r--r-- | plugins/zsh-navigation-tools/README.md | 206 |
1 files changed, 17 insertions, 189 deletions
diff --git a/plugins/zsh-navigation-tools/README.md b/plugins/zsh-navigation-tools/README.md index 7d2ce99f4..bdbfac976 100644 --- a/plugins/zsh-navigation-tools/README.md +++ b/plugins/zsh-navigation-tools/README.md @@ -1,207 +1,41 @@ [![License (GPL version 3)](https://img.shields.io/badge/license-GNU%20GPL%20version%203-blue.svg?style=flat-square)](./LICENSE) [![MIT License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](./LICENSE) ![ZSH 5.0.0](https://img.shields.io/badge/zsh-v5.0.0-orange.svg?style=flat-square) +[![Gitter][gitter-image]][gitter-link] -![znt logo](http://imageshack.com/a/img905/2629/WK9qjN.png) - -[![paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D6XDCHDSBDSDG) +![znt logo](https://imageshack.com/a/img905/2629/WK9qjN.png) # Zsh Navigation Tools -Also check out [![ZCA](http://imageshack.com/a/img911/8084/qSpO8a.png) Zsh Command Architect](https://github.com/psprint/zsh-cmd-architect) -and [Zconvey](https://github.com/psprint/zconvey) - - - -Videos: -- [https://youtu.be/QwZ8IJEgXRE](https://youtu.be/QwZ8IJEgXRE) -- [https://youtu.be/DN9QqssAYB8](https://youtu.be/DN9QqssAYB8) - -Screenshots: - -![n-history](http://imageshack.com/a/img921/5046/bqr0mk.png) - -![n-history](http://imageshack.com/a/img633/9905/WzfSdl.gif) - -Set of tools like `n-history` – multi-word history searcher, `n-cd` – directory -bookmark manager, `n-kill` – `htop` like kill utility, and more. Based on +Set of tools like `n-history` – multi-word history searcher, `n-cd` – directory +bookmark manager, `n-kill` – `htop` like kill utility, and more. Based on `n-list`, a tool generating selectable curses-based list of elements that has access to current `Zsh` session, i.e. has broad capabilities to work together with it. Feature highlights include incremental multi-word searching, approximate matching, ANSI coloring, themes, unique mode, horizontal scroll, grepping, advanced history management and various integrations with `Zsh`. -## News -* 06-10-2016 - - **Tmux-integration** – `Ctrl-B H` in Tmux to open `n-history` in new window. - Then select history entry, it will be copied to the original Tmux window. - Use this to execute local commands on remote hosts: - - ![tmux integration](http://imageshack.com/a/img922/4760/oyX7eN.gif) - - All that is needed is this line added to `~/.tmux.conf`: - - ``` - bind h run-shell -b "$ZNT_REPO_DIR/doc/znt-tmux.zsh" - ``` - - or – if Homebrew or other package manager is used: - - ``` - bind h run-shell -b "$ZNT_REPO_DIR/znt-tmux.zsh" - ``` - -* 16-05-2016 - - `n-kill` has completion. It proposes **words** from what's in `ps -A`. Giving `n-kill` - arguments means grepping – it will start only with matching `ps` entries. - -* 15-05-2016 - - Fixed problem where zsh-syntax-highlighting could render `n-history` slow (for - long history entries). - -* 14-05-2016 - - Configuration can be set from `zshrc` (starting from `v2.1.12`). Documentation is [below](#configuration). Example: - - ```zsh - znt_list_instant_select=1 - znt_list_border=0 - znt_list_bold=1 - znt_list_colorpair="green/black" - znt_functions_keywords=( "zplg" "zgen" "match" ) - znt_cd_active_text="underline" - znt_env_nlist_coloring_color=$'\x1b[00;33m' - znt_cd_hotlist=( "~/.config/znt" "/usr/share/zsh/site-functions" "/usr/share/zsh" - "/usr/local/share/zsh/site-functions" "/usr/local/share/zsh" - "/usr/local/bin" ) - ``` - -* 10-05-2016 - - Search query rotation – use `Ctrl-A` to rotate entered words right. - Words `1 2 3` become `3 1 2`. - -* 09-05-2016 - - New feature: n-help tool, available also from n-history via `H` key. It - displays help screen with various information on `ZNT`. - - ![n-help](http://imageshack.com/a/img922/7595/MvtJdI.gif) - -* 08-05-2016 - - Approximate matching – pressing `f` or `Ctrl-F` will enter "`FIX`" mode, - in which `1` or `2` errors are allowed in what's searched. This utilizes - original Zsh approximate matching features and is intended to be used - after entering search query, when a typo is discovered. - - ![fix mode](http://imageshack.com/a/img921/5756/64lFnv.gif) - -* 06-05-2016 - - Private history can be edited. Use `e` key or `Ctrl-E` for that when in - n-history. Your `$EDITOR` will start. This is a way to have handy set of - bookmarks prepared in private history's file. - - Border can be disabled. Use following snippet in `~/.config/znt/n-list.conf` - or any other tool-targetted config file: - - ```zsh - # Should draw the border? - local border=0 - ``` - -* 30-04-2016 - - New feature: color themes. Use `Ctrl-T` and `Ctrl-G` to browse predefined - themes. They are listed in [~/.config/znt/n-list.conf](https://github.com/psprint/zsh-navigation-tools/blob/master/.config/znt/n-list.conf). - Use the file to permanently set a color scheme. Also, I sent a patch to Zsh developers - and starting from Zsh > 5.2 (not yet released) supported will be 256 colors. - The file [~/.config/znt/n-list.conf](https://github.com/psprint/zsh-navigation-tools/blob/master/.config/znt/n-list.conf) - already has set of 256-color themes prepared :) - - ![themes](http://imageshack.com/a/img924/4310/EbRh30.gif) - -* 29-04-2016 - - New feature: private history – n-history tracks selected history entries, - exposes them via new view (activated with `F1`). It is shared across all - sessions - -* 28-04-2016 - - New features: - 1. New n-history view (activated with `F1`): Most Frequent History Words - 2. Predefined search keywords – use F2 to quickly search for chosen - keywords (video: [https://youtu.be/DN9QqssAYB8](https://youtu.be/DN9QqssAYB8)) - 3. Configuration option for doing instant selection in search mode - -## Installation - -``` -sh -c "$(curl -fsSL https://raw.githubusercontent.com/psprint/zsh-navigation-tools/master/doc/install.sh)" -``` - -To update run the command again. - -`ZNT` will be installed at `~/.config/znt/zsh-navigation-tools`, config files will be copied to `~/.config/znt`. `.zshrc` -will be updated with only `8` lines of code, which will be added at the bottom. - -After installing and reloading shell give `ZNT` a quick try with `Ctrl-R` – this keyboard shortcut will open `n-history`. - -## Installation With [Zplugin](https://github.com/psprint/zplugin) -Add `zplugin load psprint/zsh-navigation-tools` to `.zshrc`. The config files will be in `~/.config/znt`. - -## Installation With Zgen - -Add `zgen load psprint/zsh-navigation-tools` to `.zshrc` and issue a `zgen reset` (this assumes that there is a proper `zgen save` construct in `.zshrc`). -The config files will be available in `~/.config/znt`. - -## Installation With Antigen -Add `antigen bundle psprint/zsh-navigation-tools` to `.zshrc`. There also -should be `antigen apply`. The config files will be in `~/.config/znt`. - -## Single File Manual Installation - -Running script `doc/generate_single_file` will create single-file version of `ZNT`. -It can be sourced from `.zshrc`. Don't forget about configuration files as described -above. - -## Manual Installation - -After extracting `ZNT` to `{some-directory}` add following two lines -to `~/.zshrc`: +To use it, add `zsh-navigation-tools` to the plugins array in your zshrc file: ```zsh -fpath+=( {some-directory} ) -source "{some-directory}/zsh-navigation-tools.plugin.zsh" +plugins=(... zsh-navigation-tools) ``` -As you can see, no plugin manager is needed to use the `*.plugin.zsh` -file. The above two lines of code are all that almost **all** plugin -managers do. In fact, what's actually needed is only: +Also check out [![ZCA](https://imageshack.com/a/img911/8084/qSpO8a.png) Zsh Command Architect](https://github.com/zdharma-continuum/zsh-cmd-architect) +and [Zconvey](https://github.com/zdharma-continuum/zconvey) -```zsh -source "{some-directory}/zsh-navigation-tools.plugin.zsh" -``` - -because `ZNT` detects if it is used by **any** plugin manager and can -handle `$fpath` update by itself. - -## Truly Manual Installation -Copy (or link) all `n-*` and `znt-*` files to **/usr/share/zsh/site-functions/** -(or **/usr/local/share/zsh/site-functions/**, check with `echo $fpath[1]`) and then add: - autoload n-list n-cd n-env n-kill n-panelize n-options n-aliases n-functions n-history n-help -to `~/.zshrc`. - -Create aliases to avoid typing of the minus sign "-": +Videos: +- [https://youtu.be/QwZ8IJEgXRE](https://youtu.be/QwZ8IJEgXRE) +- [https://youtu.be/DN9QqssAYB8](https://youtu.be/DN9QqssAYB8) -```zsh -alias naliases=n-aliases ncd=n-cd nenv=n-env nfunctions=n-functions nhistory=n-history -alias nkill=n-kill noptions=n-options npanelize=n-panelize nhelp=n-help -``` +Screenshots: -Don't forget to copy [configuration files](https://github.com/psprint/zsh-navigation-tools/tree/master/.config/znt). They should go to `~/.config/znt`. Moreover, `n-cd` works together with option `AUTO_PUSHD` and you should have: +![n-history](https://imageshack.com/a/img921/5046/bqr0mk.png) -```zsh -setopt AUTO_PUSHD -``` +![n-history](https://imageshack.com/a/img633/9905/WzfSdl.gif) -in `.zshrc` (also recommend `PUSHD_IGNORE_DUPS`). Without the option `n-cd` -will just work as incremental searcher of directory bookmarks. ## History Widget @@ -397,15 +231,7 @@ The same with doing any non-typical Zsh Navigation Tools installation. ## More -- be aware of [this](https://github.com/psprint/zsh-navigation-tools/blob/f49f910d239ae5bc6e1a5bb34930307b4f4e3ffe/zsh-navigation-tools.plugin.zsh#L35-L49) - -## IRC Channel - -Channel `#zplugin@freenode` is a support place for all author's projects. Connect to: -[chat.freenode.net:6697](ircs://chat.freenode.net:6697/%23zplugin) (SSL) or [chat.freenode.net:6667](irc://chat.freenode.net:6667/%23zplugin) - and join #zplugin. - -Following is a quick access via Webchat [![IRC](https://kiwiirc.com/buttons/chat.freenode.net/zplugin.png)](https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin) +- be aware of [this](https://github.com/zdharma-continuum/zsh-navigation-tools/blob/f49f910d239ae5bc6e1a5bb34930307b4f4e3ffe/zsh-navigation-tools.plugin.zsh#L35-L49) # Fixing tmux, screen and linux vt @@ -429,3 +255,5 @@ It will not display underline properly, but will instead highlight by a color, which is quite nice. The same will not work for FreeBSD's vt, `ZNT` will detect if that vt is used and will revert to highlighting elements via `reverse` mode. +[gitter-image]: https://badges.gitter.im/zdharma-continuum/community.svg +[gitter-link]: https://gitter.im/zdharma-continuum/community |