Bengt Brodersen and Geza Lore
fd27842cad
feat: add fuzzy search
2017-05-16 19:49:29 +01:00
Bengt Brodersen and Suraj N. Kurapati
563c88c4ca
README: add installation instructions for Homebrew
2017-05-15 22:42:16 -07:00
Geza Lore and GitHub
c750a17757
Merge pull request #67 from gezalore/master
...
Fix breakage with setopt ERR_RETURN (Issue #60 )
2017-05-05 21:45:55 +01:00
Geza Lore
07011f632b
Fix breakage with setopt ERR_RETURN (Issue #60 )
2017-05-05 19:20:48 +01:00
Suraj N. Kurapati and GitHub
2b6451de03
README: upgrade to CommonMark; move <C-v> note up
2017-05-05 03:34:00 -07:00
Suraj N. Kurapati and GitHub
21c025eb33
Merge pull request #78 from RuRo/patch-1
...
Updated README.md keybinding instructions.
2017-05-05 03:24:21 -07:00
RuRo and GitHub
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 and GitHub
aae3388491
Merge pull request #62 from alyssais/declare
...
declare global variables to support `setopt warn_create_global`
v1.0.1
2016-12-11 11:44:51 -08:00
Suraj N. Kurapati and GitHub
8d0ae55a43
Merge pull request #66 from disarmer/master
...
Add support for WARN_CREATE_GLOBAL option. Fixes #65
2016-12-11 11:39:11 -08:00
disarmer mk
1a9b72a95f
typeset for variables. Fixes #65
2016-12-02 22:18:19 +03:00
Alyssa Ross
fd331b8345
global variables: fix array declarations
2016-11-02 01:33:44 +00:00
Alyssa Ross
f7c8d3157b
global variables: declare up-front
2016-11-02 01:23:59 +00:00
Alyssa Ross
3fa98998c5
Revert "Declare global variables"
...
This reverts commit b554feb7ba .
2016-11-02 01:23:59 +00:00
Alyssa Ross
d26aaa6594
Revert "Declare more global variables"
...
This reverts commit ec88096611 .
2016-11-02 01:23:59 +00: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
Alyssa Ross
ec88096611
Declare more global variables
2016-09-13 22:00:53 +01:00
Alyssa Ross
b554feb7ba
Declare global variables
...
This was causing warnings with `setopt warn_create_global`.
2016-08-31 16:55:09 +00:00
Suraj N. Kurapati
6008552895
GH-44: fix "parameter not set" warning by set -u
...
$ zsh -f
zsh% set -u
zsh% source zsh-history-substring-search.zsh
zsh% bindkey '^[[A' history-substring-search-up
zsh% bindkey '^[[B' history-substring-search-down
zsh% so<up>
_history-substring-search-begin:11: _history_substring_search_result: parameter not set
2016-07-16 09:25:50 -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 and Suraj N. Kurapati
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 and Suraj N. Kurapati
557d25e940
Merge pull request #55 from gezalore/ensure_unique
2016-06-25 12:18:36 -07:00
Geza Lore
3e64e0e9fa
Fix repeat search with HIST_FIND_NO_DUPS.
2016-05-23 21:42:08 +01: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
Geza Lore
352943873d
Add option to ensure unique search results.
...
If HISTORY_SUBSTRING_SEARCH_ENSURE_UNIQUE is set to a non-empty string,
then all displayed search results will be unique even if the shell
option HIST_IGNORE_ALL_DUPS is not set.
2016-03-05 19:36:25 +00:00
Geza Lore
7444ca5783
Do not search history when query is empty.
...
We used to do a history search when the query string was empty, which
resulted in all history indices being returned, but they are never
actually used as _history-substring-search-up-history and
_history-substring-search-down-history will just act like ZSH up-history
and down-history if the query is empty. Removing this unnecessary lookup
should speed up the empty query case, especially if you have a long
history.
2016-03-05 15:21:24 +00:00
Geza Lore
6001e1f0f5
Refactor to reverse internal enumeration order.
...
This is a pure refactoring patch and does note change any functionality.
We remove an unnecessary reversal of the history match array by swapping
the enumeration order of match indices. Older entries now have higher
internal indices than younger entries, and hence we start from 1.
Also removed one unreachable elif clause each from search-up and
search-down.
2016-03-05 13:53:25 +00:00
Suraj N. Kurapati
7a4b54b708
Merge pull request #51 from Eriner/master
...
add *.zwc to gitignore
2015-12-18 11:02:01 -08:00
Matt Hamilton
e669342235
add *.zwc to gitignore
2015-12-17 12:19:28 -05:00
Suraj N. Kurapati
2f8a5f8fe3
drop oh-my-zsh config file: they supply their own
...
https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/history-substring-search/history-substring-search.plugin.zsh
2015-12-14 11:19:29 -08:00
Suraj N. Kurapati
2c29543217
Merge pull request #45 from Eriner/master
...
convert ksh functions to POSIX syntax
2015-09-28 10:47:34 -07:00
Matt Hamilton
e2ab5b8214
convert ksh functions to POSIX syntax
2015-09-28 13:19:16 -04: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
6d7bc718ae
skip HIST_FIND_NO_DUPS if HIST_IGNORE_ALL_DUPS set
...
Thanks to @ELLIOTTCABLE for suggesting this optimization:
https://github.com/zsh-users/zsh-history-substring-search/issues/19#issuecomment-90295460
2015-04-06 17:33:27 -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 and Suraj N. Kurapati
98a5e85c2d
setopt HIST_IGNORE_ALL_DUPS also fixes #19 and #42
2015-04-06 16:57:21 -07:00
Suraj N. Kurapati
fc7eb3cbf0
GH-42: speed up HIST_FIND_NO_DUPS: drop O(n) prune
...
Don't prune all duplicates from the search space *before* performing the
search! Instead, simply redo the search when a duplicate result is found.
2015-03-22 11:16:12 -07:00
Suraj N. Kurapati
5866858947
Merge pull request #41 from parkercoates/master
...
GH-19: Respect the HIST_FIND_NO_DUPS option.
2015-03-17 10:59:44 -07:00
Parker Coates
13033d87a1
GH-19: Respect the HIST_FIND_NO_DUPS option.
...
This is the best way I've found to remove duplicate entries while
keeping the most recent occurence, but I'm not a ZSH expert. There may
be a more efficient way.
2015-03-16 08:35:28 -03:00
Parker Coates
fd31074470
Use array reversal instead of array sorting.
...
There's no need to do a full numerical sort here, since we know the
keys will be in reverse numerical order, because (R) searches in last-
to-first order. Not a big deal, but this is just simpler and
presumably more efficient.
Also cleaned up a rather confusing comment about (on) being used to
remove duplicates, which it definitely doesn't.
2015-03-16 08:30:05 -03:00
Suraj N. Kurapati
3c7b079275
Merge zsh-syntax-highlighting #143 to close #15
...
The problem reported in issue #15 was fixed upstream in #143 :
https://github.com/zsh-users/zsh-syntax-highlighting/pull/143
2015-02-17 12:16:55 -08: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
v1.0.0
2013-11-02 12:55:57 -07:00
Arash Rouhani and Suraj N. Kurapati
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 and Suraj N. Kurapati
d9b28ed7f9
GH-21: bind arrow key codes according to terminfo
2013-07-05 08:51:14 -07:00
Jon Rogers and Suraj N. Kurapati
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
https://github.com/sorin-ionescu/prezto/commit/3c5363ef9bcfda4cc5cd46ca85a7109f783c9539
2013-04-25 14:46:22 -07:00