[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Readline : move to previous/next path component
From: |
Chet Ramey |
Subject: |
Re: Readline : move to previous/next path component |
Date: |
Tue, 14 Oct 2008 22:59:28 -0400 |
User-agent: |
Thunderbird 2.0.0.17 (Macintosh/20080914) |
Andre Majorel wrote:
> 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"
Readline doesn't have any built-in knowledge of Unix pathnames.
You might want to take a look at emacs-mode M-b, which moves backward
by strings of alphabetic characters, and M-f, which moves forward.
You might have to play around with a macro that moves forward additional
characters past the `/', but that should get you further.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU chet@case.edu http://cnswww.cns.cwru.edu/~chet/