Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Match with prefix only #112

Closed
SleepyBag opened this issue Jul 31, 2020 · 1 comment · Fixed by #115
Closed

Feature Request: Match with prefix only #112

SleepyBag opened this issue Jul 31, 2020 · 1 comment · Fixed by #115

Comments

@SleepyBag
Copy link
Contributor

SleepyBag commented Jul 31, 2020

Say, I have following history:

python foobar.py
which python

And when I enter python and press c-p, which python matches my query. This is sometimes confusing.

So, could I have a option to match only with prefix? How do you think about this idea?

@SleepyBag SleepyBag changed the title Feature Feature Request: Match with prefix only Jul 31, 2020
@h0adp0re
Copy link

This was also requested in #95 and a subsequent PR (#96) was filed. Consider merging your efforts.

sunaku pushed a commit that referenced this issue Aug 2, 2021
* `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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants