[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: |
Wed, 15 Oct 2008 14:23:32 -0400 |
> On 2008-10-15, Chet Ramey <chet.ramey@case.edu> wrote:
> > 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.
> >
> > Readline doesn't have any built-in knowledge of Unix pathnames.
>
> For my edification, is the relative lack of Unix/shell support
> due to
> 1. "can of worms",
> 2. "readline is supposed to be general",
> 3. "there is no need for it" ?
Mostly the second one, mixed with the fact that nobody's requested
this particular feature before. Readline is very extensible; bash
adds quite a lot to the basic framework -- look at all the code in
bashline.c. If you'd like to take a crack at writing a bindable
readline command to do what you want, I'd certainly look at it for a
future version. (You'll probably get to it before I would.)
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU chet@case.edu http://tiswww.tis.case.edu/~chet/