Commit graph

31 commits

Author SHA1 Message Date
Eric Nielsen 4ee70abb6f Don't overwrite config with default values
otherwise users are obliged to set the config values *after* sourcing
the plugin. They're not able to do it before. Also, re-sourcing the
plugin will reset the values to the defaults again.

A similar change was done in zsh-autosuggestions in the past:
https://github.com/zsh-users/zsh-autosuggestions/commit/9e4d3c3
2021-08-02 15:23:57 -05:00
Xue Qianming 4f2f17cc46
add HISTORY_SUBSTRING_SEARCH_PREFIX (#112,#115)
* `HISTORY_SUBSTRING_SEARCH_PREFIX` is a global variable that defines
  how the command history will be searched for your query. If set to a non-empty
  value, only history prefixed by your query will be matched. For example,
  if this variable is empty, `ls` will match `ls -l` and `echo ls`; if it is
  non-empty, `ls` will only match `ls -l`.

Co-authored-by: Xue Qianming <qianmingxue@microsoft.com>
2021-08-02 10:20:14 -07:00
Suraj N. Kurapati 0f80b8eb33 GH-92: also try bindkey with $terminfo for arrows 2019-05-12 17:35:54 -07:00
Bastian Heist 47a7d416c6 Fix typo in README.md (#91)
The plugin line needed to contain "history-substring-search" (not zsh-history-substring-search) to work for me.
2018-02-21 10:15:09 -08:00
David Suilea d44159b5e8 support for installing as Oh-My-Zsh plugin (#87) 2017-08-03 11:15:30 -07:00
Vithon 933733e867 Update README.md
With Homebrew/homebrew-core#13567 script is now installed in a different location. updating README.md to reflect
2017-05-20 20:40:29 +01:00
Bengt Brodersen fd27842cad feat: add fuzzy search 2017-05-16 19:49:29 +01:00
Bengt Brodersen 563c88c4ca README: add installation instructions for Homebrew 2017-05-15 22:42:16 -07:00
Suraj N. Kurapati 2b6451de03 README: upgrade to CommonMark; move <C-v> note up 2017-05-05 03:34:00 -07:00
RuRo 34fdd6b1b2 Updated README.md keybinding instructions.
The solution I propose to add to the README was found in issue https://github.com/zsh-users/zsh-history-substring-search/issues/64#issuecomment-289208209 .
2017-05-03 00:50:18 +03:00
Suraj N. Kurapati af69798423 README: don't assume UP/DOWN arrows; configure it! 2016-10-19 21:44:12 -07:00
Suraj N. Kurapati 2f8a21062c README: bind arrow keys after observing key codes
Don't suggest using $terminfo[kcuu1] or $terminfo[cuu1] lookups anymore!
Instead, have the user observe the actual key codes for their arrow keys
using `cat -v` and then use those observed values to create keybindings.
This should eliminate confusion and complaints about binding arrow keys.

See https://github.com/zsh-users/zsh-history-substring-search/issues/63
2016-10-19 14:37:16 -07:00
Suraj N. Kurapati 434fabd55e README: fix markdown rendering on Github: - and _
* Extra `---` lines were rendered as horizontal rules.
* Underscores in configuration variables were italics.
2016-07-16 09:11:25 -07:00
Suraj N. Kurapati 43b456b85c README: format HISTORY as list; mention @gezalore 2016-07-16 09:07:16 -07:00
Daniel Shahaf 4257c1435d README: remove incorrect statement
Publishing a copyrightable work does not make it public domain.
2016-07-16 08:52:56 -07:00
Suraj N. Kurapati 557d25e940 Merge pull request #55 from gezalore/ensure_unique 2016-06-25 12:18:36 -07:00
Geza Lore b546105d7e Initialize option to empty string instead of unsetting. 2016-05-22 09:41:30 +01:00
Suraj N. Kurapati f5c164d4c3 GH-53: configure arrow keys for iTerm2 with cuu/d1 2016-03-06 22:33:47 -08:00
Geza Lore 8224802bda Use lazy enumeration to keep response time fast.
With HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE, it can take a while to compute
all unique search results, which would normally keep the shell unresponsive
during this computation.

This commit separates the retrieval of all history matches from the
computation of the matches that need to be presented to the user (unique
matches only if HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set). The
computation of the matches needing to be displayed is then done lazily,
and only when the user requests a new previously undisplayed result.
This keeps the response time fast while still enabling us to filter for
unique search results.
2016-03-06 10:50:33 +00:00
Suraj N. Kurapati c4a83561a1 README: add Fedora 21 to fallback up/down bindkey
https://github.com/zsh-users/zsh-history-substring-search/issues/37#issuecomment-96327615
2015-04-26 20:17:10 -07:00
Suraj N. Kurapati b5c81fd750 README: document HIST_FIND_NO_DUPS as alternative
Elliott Cable wrote:

> HIST_IGNORE_ALL_DUPS doesn't provide the functionality I want;
>
> I don't want my history actually modified; I simply want to skip
> duplicate entries when using my history-substring-search keybind. |=<

https://github.com/zsh-users/zsh-history-substring-search/issues/19#issuecomment-90289051
2015-04-06 17:24:00 -07:00
joe9 98a5e85c2d setopt HIST_IGNORE_ALL_DUPS also fixes #19 and #42 2015-04-06 16:57:21 -07:00
Suraj N. Kurapati 9f9fc7d550 README: MacOSX 10.9 users need to bind ^[[A/B too
Thanks to Andrea Leopardi for reporting this in issue #37.
2014-08-30 10:38:17 -07:00
Suraj N. Kurapati 1e76804052 README: document that ZSH 4.3 or newer is required
closes #24
2013-11-02 12:55:57 -07:00
Arash Rouhani 9c51863eb2 README: $terminfo does not work under Ubuntu 12.04
This gives further advice for keybindings: for some reason, on my Ubuntu
12.04 system, I need to enter `^[[A` but `$terminfo[kcuu1]` gives `^[OA`
2013-09-26 13:24:48 -07:00
Sorin Ionescu d9b28ed7f9 GH-21: bind arrow key codes according to terminfo 2013-07-05 08:51:14 -07:00
Jon Rogers 99341be866 GH-21: fix bindkey strings for up and down arrows 2013-06-18 23:13:26 -07:00
Suraj N. Kurapati 82fbef5132 drop default key bindings (move them into README)
https://github.com/sorin-ionescu/prezto/issues/422

3c5363ef9b
2013-04-25 14:46:22 -07:00
Sorin Ionescu ebde030990 GH-12: fix arrow bindkey and support emacs & vicmd 2012-11-21 22:11:32 -08:00
Suraj N. Kurapati acd181e11f README: update URLs to new zsh-users organization 2011-08-04 14:20:43 -07:00
Suraj N. Kurapati 1ec51023d7 move project description into README & markdownify 2011-08-04 14:19:56 -07:00