Jim Lynch wrote: > I'v been fighting a bash problem since I first installed bo. I figured > it was a bug in bash, but I've now upgraded (partially) to hamm and I've > still got it. I'm running > > ii bash 2.01.1-4 The GNU Bourne Again SHell > > I'm trying to get my command recall to work in vi mode for root. When I > hit the up arrow on the keyboard, it does recall the line, but I can't > edit it. The right and left keys don't move, but beep at me. The hjkl > keys just insert hjkl into the file. Thinking it was in an edit mode, I > tried the ESC key followed by h, j, k or l. Nope, just beeped at me. > I've tried setting my FCEDIT=vi, set -o vi, EDITOR=vi. Nothing seems to > work. I'm at my wits end on this. If I invoke bash as a normal user (I > use tcsh normally) the arrow keys don't work, but ESC-k recalls previous > lines (and ESC-j does as expected) and I can move around on the line > with h and l. The i key does inserts, cw changes a word, r and R work > fine, etc. So bash knows how, but doesn't work right for root. > > Actually neither work quite the way I want them to. I'd like for the > arrow keys to work and the intraline editing. > > Can anyone point me in the right direction?
I had some problems with bash when the shell was invoked thru the symlink /bin/sh rather than explicitly with /bin/bash. Maybe that is the problem. set -o vi # works for me echo "set editing-mode vi" >> ~/.inputrc # is what I use -Mitch