From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1376 invoked from network); 30 Sep 1999 02:11:30 -0000 Received: from mail2.primenet.com.au (HELO primenet.com.au) (?J6FUq+Ppib/GnkP3yZr9EEVn0OULHdfO?@203.24.36.6) by ns1.primenet.com.au with SMTP; 30 Sep 1999 02:11:30 -0000 Received: (qmail 13576 invoked from network); 29 Sep 1999 20:17:08 -0000 Received: from sunsite.auc.dk (130.225.51.30) by mail2.primenet.com.au with SMTP; 29 Sep 1999 20:17:08 -0000 Received: (qmail 18941 invoked by alias); 29 Sep 1999 19:27:12 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2631 Received: (qmail 18932 invoked from network); 29 Sep 1999 19:27:11 -0000 Sender: fg@s2.smtp.oleane.net Message-ID: <37F26815.B5B90B8@mandrakesoft.com> Date: Wed, 29 Sep 1999 19:27:17 +0000 From: Francis GALIEGUE Organization: MandrakeSoft X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.13-custom2 i686) X-Accept-Language: fr, en MIME-Version: 1.0 To: zsh-users@sunsite.auc.dk Subject: zsh and RPM: a case of study (for me) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, I'm a new subscriber to this list. I've used zsh for only 4 days now, but to my opinion it plain rocks. It already saves me a lot of time, no doubt on this, and I've even hacked a bit the base distribution that comes with it so that it can handle lftp (a change in a #compdef, no big deal) and .tar.bz2 archives cleanly. But all the rest is obscure to me. I've d/led the postscript of the manual and printed out, guess what, chapters 20, 21 and 23. But I haven't got what I want. Like all manuals, unfortunately, it's exhaustive but doesn't give enough examples :( What are really completion widgets? Even after rereading the aforementioned chapters 3, 4 times I still couldn't figure it out. When are they called, what do they do, etc, and more importantly, HOW TO CREATE ONE! Just for example, lets say I have a: compctl -X bar -k "(a b)" foo how can I do so that it's actually a completion widget which returns the "(a b)" stuff? Or am I missing the point completely? Another probably dumb example: I'm used to the bash key sequences (C-x|Esc)(!|@|~|/|$), how can I reproduce them in a simple manner? And for the hardest part now: a set of functions|widgets|whatever for rpm... I make RPMs quite often indeed, and I'd like: rpm -b [ --target=whatever ] to complete on *.spec files, rpm -q -- to complete on long options (--queryformat for example) then installed rpms, to complete on *.(src|any_architecture).rpm, rpm -qf to complete on files, etc.etc. and this is only one major mode of RPM. The others are certainly easier (also consider the different completions possible on a --queryformat - ugh) The problem is that I can generate each of these arrays individually (a mano for the options), but not tie them together so that it completes correctly in each of these cases... And I fear that the compctl function may not be enough for this :( Oh, also, there seems to be a bug with ZLS_COLORS: empty lines are stuffed with some random colors and it doesn't like custom foreground colors for files in the dircolors mechanism... I don't want this message to look like a rant, it's not - I really love this shell, but I wish there were a good, explanative, to-the-point programming guide too... Regards, -- fg # rm *;o o: command not found