Re: [9fans] Shall we fix the use of Up/Dn arrows?



What I'd appreciate, from the user's point of view, would be some kind
of history mechanism tied to the up/down keys in rio/win (where I
interact with a shell), up arrow bringing up the last command e.g.,
and a normal movement behaviour when editing a 'text' file (no direct
interaction with the shell, where 'enter' is just a newline).

Please no! I am constantly having to figure out how to turn off
that misfeature in this week's version of bash. Maybe it only
happens once in 1000 times, but in that 0.1% of the time, my
finger coming down on the return key accidentally hits the up
arrow and the timing just so happens that I rerun the previous
command instead of the one I just typed, sometimes with very
unpleasant consqeuences. I should point out that this of course
is primarily an issue with laptops and other small keyboard
designs. Of course, those are the only ones I like to use...

If one really wants to give the shell some kind of previous
command shortcut, then stick with the EMACS ^p or the old
C-shell !! (the former, of course, allowing you to scroll through
the history if that is what is desired).

As for up-arrow moving up a line, this comes up from time to
time. It's primary usefulness is in editors. But in a proportional
font, what exactly does moving up a line mean? Move to the
position that is the same number of characters from the beginning
of the line? Move to the same geometric position? What if that
position is in the middle of a character? No one ever seems to
float a proposal that hits everyone as having "the ring of truth."
I have thought there could be some usefulness in this, but I
haven't thought of a policy that is so beautiful it draws me to
the source to code it.

As with any proposal like this, if it's what you want, then implement
it. Put it out there and if enough others like it too, it may find
its way into general use. If not, you still have the functionality
that you want.

BLS


.



Relevant Pages

  • Shell History Broken - Stuck in VI Mode?
    ... I just rebooted and all of the sudden my shell is very messed up. ... press the up arrow I don't get any command history. ... positioned at the beginning of the command rather than at the end. ...
    (comp.unix.shell)
  • Re: bash history and vi mode
    ... shell usage. ... I like some of the shortcuts in bash but a few things are ... then use the up arrow to get my previous command out of history, ...
    (comp.unix.shell)
  • Re: ncurses and key commands
    ... I am writing a shell and am using ncurses to recognize key commands ... up arrow would give you the last command you input. ... There's a GNU readline package that will do this for you. ...
    (comp.lang.c)
  • Re: Can Ruby interact with the shell sh ?
    ... app that can interact with the shell, ... issue a command ... If you just want responses from commands, you can simply use lines like ... if you need to interact multiple times with a program ...
    (comp.lang.ruby)
  • ncurses and key commands
    ... I am writing a shell and am using ncurses to recognize key commands ... up arrow would give you the last command you input. ...
    (comp.unix.programmer)