on Thu, Sep 04, 2003 at 12:43:04AM -0700, Josh Rehman ([EMAIL PROTECTED]) wrote: > 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 > Did some digging and found "complete" but it wasn't very helpful (it's > a bash built-in and the man pages are terse). Am I messing up the > command line? I tried stuff like complete -o default k but it just > didn't take. Google was little help. 'complete' is the action, not the command. <tab> completes file substitution to the next non-arbitrary point. Repeat <tab> lists alternatives, as you've found. 'complete-into-braces' (M-{) might give you what you want: [EMAIL PROTECTED]:karsten]$ k Display all 191 possibilities? (y or n) [EMAIL PROTECTED]:karsten]$ k # hit <shift><alt>{ k{eysign-fingerprint,[EMAIL PROTECTED],noppix} [EMAIL PROTECTED]:karsten]$ echo k{eysign-fingerprint,[EMAIL PROTECTED],noppix} keysign-fingerprint [EMAIL PROTECTED] knoppix > 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 Peace. -- Karsten M. Self <[EMAIL PROTECTED]> http://kmself.home.netcom.com/ What Part of "Gestalt" don't you understand? Unless you are very rich and very eccentric, you will not enjoy the luxury of having a computer in your own home. -- Ed Yourdon, _Techniques of Program Structure and Design_, 1975
pgp00000.pgp
Description: PGP signature