bug-bash
[Top][All Lists]
Advanced

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

Re: completing dir names for a certain path?


From: Chet Ramey
Subject: Re: completing dir names for a certain path?
Date: Fri, 22 Aug 2008 18:58:55 -0400
User-agent: Thunderbird 2.0.0.16 (Macintosh/20080707)

Matthew Woehlke wrote:
I have a function 'cs' that roughly looks like 'cd /some/prefix/$*', that I would like to have completion for. Any tips? (For some reason, non-trivial completions never seem to want to work for me :-(.)

Why not write a shell function that prefixes the right directory to
the word to be completed, runs compgen, and strips the prefix from the
generated list of completions?

Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

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