bug-bash
[Top][All Lists]
Advanced

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

Readline : move to previous/next path component


From: Andre Majorel
Subject: Readline : move to previous/next path component
Date: Tue, 14 Oct 2008 12:20:40 +0000 (UTC)
User-agent: slrn/pre0.9.9-97 (Debian)

One frequently needed function that readline does not seem to
have is a way to move to the beginning of the next or previous
path component. This is what I've come up with :

  \C-t: "\C-b\C-b\e\C-]/\C-f"
  \C-y: "\C-]/\C-f"

Three problems with this kludge :

1. The definition uses keys, not functions. Is there a way to
   mix functions and string literals in a readline binding ?

2. If you press ^Y while past the last slash in a word, the
   cursor moves to the first slash in the next word if there is
   one, or the next character otherwise. It would be more useful
   to move immediately past the end of the current word.

3. If you press ^T while you're already on the first slash in a
   word, the cursor moves to the last slash in the previous word
   if there is one, or the previous character otherwise. It
   would be more useful to move to the beginning of the current
   word.

Is there a better way ? Thanks in advance.

-- 
André Majorel <URL:http://www.teaser.fr/~amajorel/>
You measure democracy by the freedom it gives its dissidents, not
the freedom it gives its assimilated conformists -- Abbie Hoffman.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]