Arrow keys do not work from tty to auto complete [SOLVED]

I have to manually source my ~/.zshrc to make my up and down arrow keys work when I am searching through commands in my history from a tty outside of X. Keys work as expected from a shell in X. Something else I noticed when logging in from the tty outside of X is that it drops me to / not to ~ which is also weird.

Re: Arrow keys do not work from tty to auto complete [SOLVED]

I have only just started using zsh, so I am not particularly familiar with it, but in your github repo your keys file doesn't include the arrow keys, so I am not sure how they work in X, unless your WM handles that. In my .zshrc, I have:

Re: Arrow keys do not work from tty to auto complete [SOLVED]

OK... if I ctrl+alt+F1 then log in my up/down arrow keys work BUT they do not work using history completion. In other words, I hit up arrow, it will scroll through my history but if I start typing a command and then hit up arrow, it does not honor what I typed and search within the subset. If I manually source my ~/.zshrc and try it, it does work as expected.

Re: Arrow keys do not work from tty to auto complete [SOLVED]

@jason - No, because they work just fine under X. I think your original suspicion about a sourcing problem is more likely. Plus, aren't those emacs bindings? I use vim bindings. The sole line in /etc/zsh/zprofile is:

Re: Arrow keys do not work from tty to auto complete [SOLVED]

@j - Yes, it does indeed kill the line... are we talking about the same thing here... the arrow keys work from the TTY, they just do not work as they do under X with history completion... example:

Under X I type: cd <space> <up arrow>I get:cd logscd ~cd /boot

Under a TTY I do the same and the three characters I typed "cd " have no effect and up arrow gives me just a blind list of my last commands. EXCEPT after I manually source my ~/.zshrc at which point the up arrow behaves as it did under X.

Re: Arrow keys do not work from tty to auto complete [SOLVED]

Re: Arrow keys do not work from tty to auto complete [SOLVED]

@graysky If you logged into a new TTY, and the new bind worked, then your .zshrc is being correctly sourced.

@anonymous_user that shouldn't be necessary (but it might not hurt as a hack).

My suspicion is that it is still the way you have defined the keys (although that doesn't account for how they work as expected once you source the file from the TTY). In any event, as you won't test my hypothesis, the point is moot.

Re: Arrow keys do not work from tty to auto complete [SOLVED]

jasonwryan wrote:

@graysky If you logged into a new TTY, and the new bind worked, then your .zshrc is being correctly sourced.

My suspicion is that it is still the way you have defined the keys (although that doesn't account for how they work as expected once you source the file from the TTY). In any event, as you won't test my hypothesis, the point is moot.

Thought I did?

graysky wrote:

@jason - I pasted your ~/.zprofile to my ~ and tried it out from the TTY... no change

Re: Arrow keys do not work from tty to auto complete [SOLVED]

No, I meant the keybinds I pasted right at the start f this thread. Remove everything else from your keys fle and just start with those (that is what I did). I currently only have this key-related stuff in my .zshrc:

Re: Arrow keys do not work from tty to auto complete [SOLVED]

OK... I replaced my ~/.zshrc with your code:

/home/facade/.zshrc:bindkey:9: no such keymap `menuselect'
/home/facade/.zshrc:bindkey:10: no such keymap `menuselect'
/home/facade/.zshrc:bindkey:11: no such keymap `menuselect'
/home/facade/.zshrc:bindkey:12: no such keymap `menuselect'
ease%