Score:0

Bash vi-bindings position of last CLI character

tl flag

I'll use

ls -la

as an example.

On Iterm2 (xterm-color256 vi-bindings), when I use the up arrow to go to the last command, the cursor is placed to the right of the 'a'.

When I hit the left hand cursor key, the cursor moves so it's on the 'a'.

When I hit the right hand cursor key, the cursor does not move to the right again, as this is the last char. I have set -o vi in my .login, so using $ to go to the end of the line also moves the character to the 'a', not to its right.

I've seen (probably emacs binding) cloud VM bash xp where the cursor can always go to the right of the last char so I can add to a command. How can I do that with vi bindings? I always have to use esc-A to replicate this with vi bindings which is a little annoying - I can't find suitable docs, and Iterm2 prefs doesn't show an option either.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.