l i n u x - u s e r s - g r o u p - o f - d a v i s
Next Meeting:
July 7: Social gathering
Next Installfest:
Latest News:
Jun. 14: June LUGOD meeting cancelled
Page last updated:
2003 Mar 25 16:33

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] vi key bindings, readline and bash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] vi key bindings, readline and bash

begin Charles Polisher <cpolish@attbi.com> 
> Peter Jay Salzman wrote:
> > > > > does it work for anybody?
> > > > 
> > > > Not here.
> > > 
> > > SuSE does the right thing as-is; this is from /etc/inputrc :
> > > 	$if mode=vi
> > > 	set editing-mode vi
> > > 	set keymap vi
> > > 	$endif
> > > and the environment has INPUTRC set to "/etc/inputrc",
> > > but that can be overridden with ~/.inputrc (bash refman p.82)
> > 
> > hi chuck,
> > 
> > i'm not sure how that can possibly be; seems really impossible.   just
> > to make absolutely sure, beyond a shadow of a doubt, can you tell me
> > what you mean by "does the right thing"?
> > 
> > there needs to be more than this, unless suse started hacking on
> > readline source code...
> "Does the right thing":
> >From an ordinary bash prompt, with a typical U.S. installation
> of SuSE Linux 8.0, inside a standard xterm, logged in as an
> ordinary user, with no further customizations of the shell, 
> press the up-arrow key. The shell displays the most recently
> typed command from the shell history, without moving the cursor
> to a different line, but positioning the cursor just beyond the
> last character of the command. At this point, pressing the
> Enter key causes that displayed command to execute. Additional
> up-arrow key presses will go further back in the shell history,
> while down-arrow replaces the displayed command with more recent
> commands. 
> "set keymap vi" is part of the standard Gnu bash distribution,
> as documented in the Bash Reference Manual, 2.5a-th ed., 11/2001.
> Thusly speaketh the man page (excuse please the fleckths of
> thspittle on the thscreen, I blame the dentithst):
>        keymap (emacs)
>               Set the current readline keymap.  The set of  valid
>               keymap  names is emacs, emacs-standard, emacs-meta,
>               emacs-ctlx, vi, vi-command, and vi-insert.   vi  is
>               equivalent  to  vi-command;  emacs is equivalent to
>               emacs-standard.  The default value  is  emacs;  the
>               value  of  editing-mode  also  affects  the default
>               keymap.
> That "(emacs)" in the first line gives the default value.
> Also, under man 3 readline, the section on default key
> bindings lists the complete "VI Mode bindings". Werner Fink
> is credited with the inputrc file, which also has these lines:
> $if term=xterm
> "\e[5;5~":  history-search-backward
> "\e[6;5~":  history-search-forward
> $endif
> "\e[C":     forward-char
> "\e[D":     backward-char
> "\e[A":     previous-history
> "\e[B":     next-history
> Maybe that's the magic you've been looking for?


so it doesn't work on 2 debian testing systems.
it DOES work on a debian woody system
it works on a redhat 7.3 system (i just checked)
it works on your suse system

hrm.  i'm starting to think maybe this is a bug in debian/testing
readline bash.    :-/

when i get back home, i'll try using the inputrc sitting on the redhat
7.3 machine that it worked on.


Fingerprint: B9F1 6CF3 47C4 7CD8 D33E 70A9 A3B9 1945 67EA 951D
vox-tech mailing list

LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.