View previous topic :: View next topic |
Author |
Message |
mukwuknuk Tux's lil' helper
Joined: 23 Dec 2003 Posts: 80 Location: Colorado, USA
|
Posted: Thu Jan 01, 2004 4:15 pm Post subject: vi lovers question |
|
|
For those of you who, as I do, like vi almost as much as an intelligent, sexy, charming person of the opposite gender, I have a question:
I always set my command prompt to behave like vi (set -o vi) but my disobedient fingers still stray to the up and down arrow keys ro recall commands, which is OK if the reacalled command needs no change, but the arrows keys ruin vi behavior if editting is needed.
Is there a way to *disable* the up and down arrow keys from recalling commands? Thanks! _________________ "If there are back-slashes in your path, you're heading down the wrong path ... backwards." |
|
Back to top |
|
|
Oatmeal n00b
Joined: 17 Dec 2003 Posts: 46
|
Posted: Thu Jan 01, 2004 11:19 pm Post subject: |
|
|
Just press the escape key after you press the arrow key to switch your shell from insert mode to command mode. |
|
Back to top |
|
|
mukwuknuk Tux's lil' helper
Joined: 23 Dec 2003 Posts: 80 Location: Colorado, USA
|
Posted: Fri Jan 02, 2004 2:53 am Post subject: |
|
|
Thanks for the suggestion, but I'm not asking about switching from one mode to another in vi.
This is a command-line question only and isn't really about using vi as an editor.
I'm wondering if I can effectively and permanently disable the retrieval of past commands via the up and down arrows. While such a techique is admittedly characteristic of BASH, it's a decidedly "non-vi" way of getting commands recalled and accidental use of the arrows seriously goofs up vi-like-behaviour at the command prompt.
But I do appreciate the help. _________________ "If there are back-slashes in your path, you're heading down the wrong path ... backwards." |
|
Back to top |
|
|
Bonkie Guru
Joined: 28 Oct 2002 Posts: 501 Location: Antwerpen, Belgium
|
Posted: Fri Jan 02, 2004 1:17 pm Post subject: |
|
|
Very interesting actually.
man bash doesn't show any option to alter or disable that behaviour. You can however turn off the interactive shell but that doesn't help you ... _________________ "I would say we have a 50% chance of survival, but I consider myself an optimist so I'll give us 50,5% ..."
~ Arthur C. Clarke [Physics PHD,SF Writer], when asked about the chances of the human race's survival |
|
Back to top |
|
|
|