Git Product home page Git Product logo

Comments (10)

jasonkuhrt avatar jasonkuhrt commented on May 20, 2024

Note this bug report applies to both iterm2 and terminal.

from zsh-history-substring-search.

sunaku avatar sunaku commented on May 20, 2024

What output do you see when you run cat -v and then press the up and down arrow keys?

from zsh-history-substring-search.

jasonkuhrt avatar jasonkuhrt commented on May 20, 2024

Hey, here's the result; I pressed up and down:

❯ cat -v
^[[A^[[B

from zsh-history-substring-search.

jasonkuhrt avatar jasonkuhrt commented on May 20, 2024

I solved my problem by updating my zsh configuration with the following:

zmodload zsh/terminfo
bindkey "$terminfo^[[A" history-substring-search-up
bindkey "$terminfo^[[B" history-substring-search-down

Assuming this is correct you I guess just update your documentation?

from zsh-history-substring-search.

jasonkuhrt avatar jasonkuhrt commented on May 20, 2024

Sorry, never mind. I confused myself into think what I did above worked. It does not.

from zsh-history-substring-search.

sunaku avatar sunaku commented on May 20, 2024

@jasonkuhrt Since your cat -v showed ^[[A for up and ^[[B for down, try using these settings:

bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down

from zsh-history-substring-search.

jasonkuhrt avatar jasonkuhrt commented on May 20, 2024

Solved! Documentation just needs tweaking then?

from zsh-history-substring-search.

sunaku avatar sunaku commented on May 20, 2024

@jasonkuhrt Yes, docs tweaked accordingly in commit 2f8a210. 🌟

from zsh-history-substring-search.

lexinator avatar lexinator commented on May 20, 2024

i never dug into why but i use:

bindkey "$terminfo[kcuu1]" history-substring-search-up
bindkey "$terminfo[kcud1]" history-substring-search-down

After a quick google i found http://stackoverflow.com/questions/21175561/terminfo-smkx-and-application-cursor-keys-vs-application-keypad. There seems to be a difference between normal mode and application mode for cursor keys.

from zsh-history-substring-search.

sunaku avatar sunaku commented on May 20, 2024

@lexinator Thanks for the background. 📚 I've seen enough reports (#12, #21, #37) about the various "portable" keycode expressions not working consistently for everyone that I'm satisfied with the experimental method outlined in the README: even though it may be unportable across all terminals, it's at least 💯 guaranteed to work for the user on the terminal where they observed their cat -v output.

from zsh-history-substring-search.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.