Unix Shell - inputrc

This is Interesting: Free IT Magazines  
Home > Archive > Unix Shell > August 2007 > inputrc





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author inputrc
Ardek

2007-08-24, 1:24 pm

I have a mapping in the .inputrc-File
(using a current bash-version)

"foo": "command X bar"

So what I do, I enter "foo" on the command-line,
and then go back to X with "FXs" (vi-mode)

Is it possible to define an inputrc-mapping in such a way
that I end up with the cursor between

command CURSOR bar?


Ardek

Dave Gibson

2007-08-25, 1:22 pm

Ardek <miscus@gmail.com> wrote:
> I have a mapping in the .inputrc-File
> (using a current bash-version)
>
> "foo": "command X bar"
>
> So what I do, I enter "foo" on the command-line,
> and then go back to X with "FXs" (vi-mode)
>
> Is it possible to define an inputrc-mapping in such a way
> that I end up with the cursor between
>
> command CURSOR bar?


Append "\eFXs" (literal '' and 'e') to the binding:

$if Bash

# Command mode:
set keymap vi
"foo": "icommand X bar\eFXs"

# Insert mode:
set keymap vi-insert
"foo": "command X bar\eFXs"

$endif
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com