on Thu, Sep 04, 2003 at 12:43:04AM -0700, Josh Rehman ([EMAIL PROTECTED]) wrote:I think this should be:
Hi,
I was wondering if it is possible to grep through the output of bash command line completion. If you type "k" and then tab twice, you'll be asked to show all 398,499 entries on your path, y or n. Hit y and a big list comes up. Seems like it would be nice to search through that list, but there is no obvious way to pipe it to anything (like grep).
This should be equivalent:
for d in $( echo $PATH | sed -e 's/:/ /g' ); do ls $p/k*; done | less
for d in $( echo $PATH | sed -e 's/:/ /g' ); do ls $d/k*; done | less
But yes, this works pretty well, thanks! (It chokes on bad directories in the path, and prints out full file names, and doesn't include bash built-ins, but otherwise works perfectly :-)
Thanks for that. I'm sure I'll be playing with this quite a lot for a bit.While I'm at it, is there a way to make "CTRL+Left Arrow" move one word to the left on the command line? And similiarly for right? That would be so great...IIRC DRDOS had that a long time ago. The win2k shell does that, too. I don't even know where to start looking for this one. :-)
man bash /^ *Readline Key Bindings
Specifically: forward-word and backward-word
FWIW this helped me to discover that Bash already supports word navigation and deletion: Alt+f, Alt+b, Alt+d does forward, back, and delete respectively. Seems to me that CTRL+Left Arrow etc should be part of the default bindings. But what do I know?
Thanks again!
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]