[vox-tech] readline questions (in bash)
Mike Simons
vox-tech@lists.lugod.org
Fri, 13 Jun 2003 13:08:51 -0400
--+1TulI7fc0PCHNy3
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
On Fri, Jun 13, 2003 at 08:42:23AM -0700, Adrian Kalaveshi wrote:
> >Is there another way to search thru and execute a command in the history
>=20
> Enter vi mode in bash with 'set -o vi'.
On Fri, Jun 13, 2003 at 11:35:27AM -0500, Jay Strauss wrote:
> the only problem is up|down arrow (command recall) don't work until I hit
> left or right arrow. If I don't hit left|right I just get a flash (visual
> bell) when I hit up|down
Jay,
That is because arrow keys do not work in vi to move. You may think
they do "because it works in vim, or vile, or elvis" but those are
improvements which the original versions did not do. If you want to
review your history you need to hit ESC then 'j' or 'k'.
Many people notice that if you hit down then up scrolling through
the history "works"... I don't know why this is, it seems like a bug.
on standard terminals:
up key is =3D=3D ESC [ A
down key is =3D=3D ESC [ B
I don't understand how those combinations of characters move around=20
in vi-command mode.
Since most every GNU utility that provides a command mode uses=20
libreadline I suggest that if you really do like the vi mode, that
you add:
set editing-mode vi
to your own ~/.inputrc which libreadline uses to configure itself, this=20
will make things like bash, gdb, and the rest behave the same way on=20
startup.
--=20
GPG key: http://simons-clan.com/~msimons/gpg/msimons.asc
Fingerprint: 524D A726 77CB 62C9 4D56 8109 E10C 249F B7FA ACBE
--+1TulI7fc0PCHNy3
Content-Type: application/pgp-signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE+6gUj4Qwkn7f6rL4RArNXAJwMjUsbkC+FBr8+SraMtC48zJrqtQCbBfZS
4uFRwpNusw9T4oCUaXQigIM=
=HIZl
-----END PGP SIGNATURE-----
--+1TulI7fc0PCHNy3--