[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: find a command i have recently used in bash



On Sat, Feb 01, 2003 at 12:25:31AM +0100, Carel Fellinger wrote:
> On Fri, Jan 31, 2003 at 03:09:54PM +0100, Ulf Rompe wrote:
> ...
> > As an example, another useful (for me) addition to the inputrc is
> > this one: 
> > 
> > # Ctrl-Left/Right jumps wordwise on cmd line
> > "\e[D":         backward-word
> > "\e[C":         forward-word
> 
> I fail to see the Control part here, it just looks like the codes for
> right and left.  I would be very interested if it could work with
> control/meta, would make it easier for me to remember all the search
> commands.

it's different on my keyboard, too. see below.

> > This redefines the commands normally known as M-b / M-f to more
> > intuitive key strokes.
> 
> I must be missing something:)  Aren't those already bound to word
> movement?  Besides, the above inputrc snippet doesn't touch M-b/M-f,
> but the cursor keys.

on my keyboard it's ESC-f <forward> and ESC-b <backward> which i
don't like. seems klutzy. ctl-arrow would be much more sexful.

try this:

	press ctl-v
	press leftarrow

voila, there's your key sequence for left-arrow. now try it
again, with a variation:

	press ctl-v
	press CTL-leftarrow [holding control down]

is that the same as it was without control? it wasn't on my
setup. it's different for each modifier and for each combination
of modifiers!

here's the results of my own tests -- your setup may be
different:

	# leftarrow   shift   alt     ctl
	#	^[[D        -      -       -
	#	^[[2D    +shift    -       -
	#	^[[3D      -     +alt      -
	#	^[[4D    +shift  +alt      -
	#	^[[5D      -       -     +ctl
	#	^[[6D    +shift    -     +ctl
	#	^[[7D      -     +alt    +ctl
	#	^[[8D    +shift  +alt    +ctl
	#
	# uparrow    = ^[[A -- ^[[8A
	# downarrow  = ^[[B -- ^[[8B
	# rightarrow = ^[[C -- ^[[8C

also learn about page-up & -down, home, end, insert and delete.
very cool.

-- 
I use Debian/GNU Linux version 3.0;
Linux server 2.4.20-k6 #1 Mon Jan 13 23:49:14 EST 2003 i586 unknown
 
DEBIAN NEWBIE TIP #101 from Joost Kooij <joost@topaz.mdcc.cx>
:
Looking for a way to CREATE A PAGE OF LINKS to all the
*/index.html that already exist in your /usr/share/doc tree?
	apt-get install dwww
then point your browser to:
	http://localhost/dwww

Also see http://newbieDoc.sourceForge.net/ ...



Reply to: