Permalink
Commits on Dec 11, 2016
  1. Merge pull request #62 from alyssais/declare

    declare global variables to support `setopt warn_create_global`
    sunaku committed on GitHub Dec 11, 2016
  2. Merge pull request #66 from disarmer/master

    Add support for WARN_CREATE_GLOBAL option. Fixes #65
    sunaku committed on GitHub Dec 11, 2016
Commits on Dec 2, 2016
  1. typeset for variables. Fixes #65

    disarmer committed Dec 2, 2016
Commits on Nov 2, 2016
  1. Revert "Declare global variables"

    This reverts commit b554feb.
    alyssais committed Nov 2, 2016
  2. Revert "Declare more global variables"

    This reverts commit ec88096.
    alyssais committed Nov 2, 2016
Commits on Oct 20, 2016
Commits on Oct 19, 2016
  1. 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 #63
    sunaku committed Oct 19, 2016
Commits on Sep 13, 2016
  1. Declare more global variables

    alyssais committed Sep 13, 2016
Commits on Aug 31, 2016
  1. Declare global variables

    This was causing warnings with `setopt warn_create_global`.
    alyssais committed Aug 31, 2016
Commits on Jul 16, 2016
  1. 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
    sunaku committed Jul 16, 2016
  2. README: fix markdown rendering on Github: - and _

    * Extra `---` lines were rendered as horizontal rules.
    * Underscores in configuration variables were italics.
    sunaku committed Jul 16, 2016
  3. README: remove incorrect statement

    Publishing a copyrightable work does not make it public domain.
    danielshahaf committed with sunaku Jul 4, 2016
Commits on Jun 25, 2016
Commits on May 23, 2016
Commits on May 22, 2016
Commits on Mar 7, 2016
Commits on Mar 6, 2016
  1. 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.
    gezalore committed Mar 5, 2016
Commits on Mar 5, 2016
  1. 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.
    gezalore committed Mar 5, 2016
  2. 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.
    gezalore committed Mar 5, 2016
  3. 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.
    gezalore committed Mar 5, 2016
Commits on Dec 18, 2015
  1. Merge pull request #51 from Eriner/master

    add *.zwc to gitignore
    sunaku committed Dec 18, 2015
Commits on Dec 17, 2015
  1. add *.zwc to gitignore

    Eriner committed Dec 17, 2015
Commits on Dec 14, 2015
Commits on Sep 28, 2015
  1. Merge pull request #45 from Eriner/master

    convert ksh functions to POSIX syntax
    sunaku committed Sep 28, 2015
Commits on Apr 27, 2015
Commits on Apr 7, 2015
  1. skip HIST_FIND_NO_DUPS if HIST_IGNORE_ALL_DUPS set

    Thanks to @ELLIOTTCABLE for suggesting this optimization:
    #19 (comment)
    sunaku committed Apr 7, 2015
  2. 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. |=<
    
    #19 (comment)
    sunaku committed Apr 7, 2015
Commits on Apr 6, 2015
Commits on Mar 22, 2015
  1. 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.
    sunaku committed Mar 22, 2015
Commits on Mar 17, 2015
  1. Merge pull request #41 from parkercoates/master

    GH-19: Respect the HIST_FIND_NO_DUPS option.
    sunaku committed Mar 17, 2015
Commits on Mar 16, 2015
  1. 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.
    parkercoates committed Mar 16, 2015