* Call for neat examples @ 1998-02-28 1:17 Timothy J Luoma 1998-02-28 10:30 ` Jimmy Mäkelä 1998-03-02 17:02 ` Sven Guckes 0 siblings, 2 replies; 9+ messages in thread From: Timothy J Luoma @ 1998-02-28 1:17 UTC (permalink / raw) To: zsh-users Hey folks As Bart just pointed out, there are many different pieces of zsh that even someone who has used the shell for awhile doesn't necessarily know about. I was wondering if there was any interest in getting together a 'best of Zsh Uses' file.... I'd be happy to put it together. I'm thinking of nifty little functions and scripts that illustrate tricks and just plain good use of the functionality (heh... pun intended) of zsh. Commented code, of course, will be the most easily reusable.... but if you can at least give an overview it will be appreciated. If you're interested, please reply (using this Subject: line) and I'll start a summary file). Thanks! TjL -- "It takes real courage to be a Macintosh user; it takes real conviction; not unlike being a Christian in the days of the Romans." - Guy Kawasaki, Chief Evangelist for Apple Computer - from "Hotseat" interview with John McChesney (3/28/97) [ my birthday! ] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Call for neat examples 1998-02-28 1:17 Call for neat examples Timothy J Luoma @ 1998-02-28 10:30 ` Jimmy Mäkelä 1998-03-02 17:02 ` Sven Guckes 1 sibling, 0 replies; 9+ messages in thread From: Jimmy Mäkelä @ 1998-02-28 10:30 UTC (permalink / raw) To: zsh-users On Fri, Feb 27, 1998 at 08:17:21PM -0500, Timothy J Luoma wrote: > I was wondering if there was any interest in getting together a > 'best of Zsh Uses' file.... I'd be happy to put it together. > > I'm thinking of nifty little functions and scripts that illustrate > tricks and just plain good use of the functionality (heh... pun intended) of > zsh. I think this is a great idea, i would love it. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Call for neat examples 1998-02-28 1:17 Call for neat examples Timothy J Luoma 1998-02-28 10:30 ` Jimmy Mäkelä @ 1998-03-02 17:02 ` Sven Guckes 1998-03-04 2:13 ` Timothy J Luoma 1 sibling, 1 reply; 9+ messages in thread From: Sven Guckes @ 1998-03-02 17:02 UTC (permalink / raw) To: zsh-users Quoting Timothy J Luoma (luomat+Lists/Zsh/users@luomat.peak.org): > [...] there are many different pieces of zsh that even someone > who has used the shell for awhile doesn't necessarily know about. > I was wondering if there was any interest in getting together a > 'best of Zsh Uses' file.... I'd be happy to put it together. > I'm thinking of nifty little functions and scripts that illustrate tricks > and just plain good use of the functionality (heh... pun intended) of zsh. How will you make it available? Perhaps on a webpage? Sven [who likes to link good pages] -- Sven Guckes guckes@math.fu-berlin.de using zsh-3.0.5 [released 961218] ZSH http://www.math.fu-berlin.de/~guckes/zsh/ Tips and tricks ZSH http://www.peak.org/zsh/ Z shell home page [971022] ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Call for neat examples 1998-03-02 17:02 ` Sven Guckes @ 1998-03-04 2:13 ` Timothy J Luoma 1998-03-10 23:05 ` Sweth Chandramouli 1998-03-12 1:27 ` Andrew J Cosgriff 0 siblings, 2 replies; 9+ messages in thread From: Timothy J Luoma @ 1998-03-04 2:13 UTC (permalink / raw) To: Sven Guckes; +Cc: zsh-users Author: Sven Guckes <guckes@math.fu-berlin.de> Original-Date: Mon, 2 Mar 1998 18:02:51 +0100 Message-ID: <19980302180251.10544@math.fu-berlin.de> > How will you make it available? Perhaps on a webpage? Sure. I'm "maintaining" the ZSH web pages as it is... But people have to submit some first :-) So far I haven't gotten a single entry. TjL ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Re: Call for neat examples 1998-03-04 2:13 ` Timothy J Luoma @ 1998-03-10 23:05 ` Sweth Chandramouli 1998-03-14 18:49 ` Timothy J Luoma 1998-03-12 1:27 ` Andrew J Cosgriff 1 sibling, 1 reply; 9+ messages in thread From: Sweth Chandramouli @ 1998-03-10 23:05 UTC (permalink / raw) To: zsh-users On Tue, Mar 03, 1998 at 09:13:40PM -0500, Timothy J Luoma wrote: > Author: Sven Guckes <guckes@math.fu-berlin.de> > Original-Date: Mon, 2 Mar 1998 18:02:51 +0100 > Message-ID: <19980302180251.10544@math.fu-berlin.de> > > > How will you make it available? Perhaps on a webpage? > > Sure. I'm "maintaining" the ZSH web pages as it is... > > But people have to submit some first :-) > > So far I haven't gotten a single entry. i've thought about this a lot, and i don't know if it will work, or at least, if it will work and still be a "zsh" page. most of the functionality that my on functions provide, at least, are only somewhat zsh-specific; zsh makes it much easier to do things, but most of the times (in my functions) it doesn't do everything itself, or in a zsh-specific way. for example, here's a quick (well, not so quick, because I was making a really stupid mistake) function called nobrs that i just wrote for myself: #!/usr/local/bin/zsh nobrs () { case ${1} in -[0-9]*) lines=${1#-} ; shift ;; *) lines=2 ;; esac ; while [[ -n ${1} ]] ; do awkstring="awk 'BEGIN {count = 0;} /^$/ {count++; if (count < ${lines}) print; next;} {print \$0; count = 0;}' ${1}" ; shift ; eval ${awkstring} ; done ; } nobrs by default removes any newlines more than 2 from whatever file(s) it gets on the command-line; if the first argument is a hyphen followed by any digits, it sets the maximum number of consecutive linebreaks to the number formed by those digits. most of the work, however, is done by an awk command-line. (tangentially, is there any way to get rid of that awk line and do this all in zsh?) the while...done and case...esac loops are shell tricks, but aren't zsh-specific; ditto for the ${1#-}. really, this is a ksh script that happens to be a zsh function because i use zsh. while this would have been something i would have loved to have seen when i was first scripting, then, it wouldn't have been something i would have looked for as a "zsh script", or expected to have found as such. there are, of course, examples that would use zsh-specific features, but in most cases, i think that those features would be used minimally in comparison to the more general parts of the function. i guess my question is, are you envisioning this as a example-based guide to zsh features, or just as a collection of cool functions used by people who use zsh? i'd love the former, of course, since i know that i definitely underuse zsh features, but have a feeling that it would turn into the latter. not that there's anything wrong with that, of course; i would also love to just get a look at some nifty scripts in general. does anyone else have any input on this? -- sweth. -- "Countin' on a remedy I've counted on before Goin' with a cure that's never failed me What you call the disease I call the remedy" -- The Mighty Mighty Bosstones ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Call for neat examples 1998-03-10 23:05 ` Sweth Chandramouli @ 1998-03-14 18:49 ` Timothy J Luoma 0 siblings, 0 replies; 9+ messages in thread From: Timothy J Luoma @ 1998-03-14 18:49 UTC (permalink / raw) To: zsh-users Author: Sweth Chandramouli <sweth@astaroth.nit.gwu.edu> Original-Date: Tue, 10 Mar 1998 18:05:32 -0500 Message-ID: <19980310180532.50103@astaroth.nit.gwu.edu> > i guess my question is, are you envisioning this as a example-based > guide to zsh features, or just as a collection of cool functions used by > people who use zsh? i'd love the former, of course, since i know that i > definitely I would like both. I'm always amazed at people who know how to use Y can do with Y, whether Y is zsh, sed, perl, etc. So I would like nifty scripts of any and all kinds, as well as those which say "And *this* particular feature is zsh-specific or zsh makes this much easier. TjL ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Call for neat examples 1998-03-04 2:13 ` Timothy J Luoma 1998-03-10 23:05 ` Sweth Chandramouli @ 1998-03-12 1:27 ` Andrew J Cosgriff 1998-03-12 2:02 ` Bart Schaefer 1 sibling, 1 reply; 9+ messages in thread From: Andrew J Cosgriff @ 1998-03-12 1:27 UTC (permalink / raw) To: zsh-users >>>>> "TJL" == Timothy J Luoma <luomat+Lists/Zsh/users@luomat.peak.org> writes: sven> How will you make it available? Perhaps on a webpage? TJL> Sure. I'm "maintaining" the ZSH web pages as it is... TJL> But people have to submit some first :-) I submitted some stuff many years ago to the old webpages. I can't say they're great examples of zsh'ing though :) -- Andrew J Cosgriff <ajc@bing.wattle.id.au> exterminate all rational thought ! driftwood database ozone lost intensity ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Call for neat examples 1998-03-12 1:27 ` Andrew J Cosgriff @ 1998-03-12 2:02 ` Bart Schaefer 1998-03-14 18:51 ` Timothy J Luoma 0 siblings, 1 reply; 9+ messages in thread From: Bart Schaefer @ 1998-03-12 2:02 UTC (permalink / raw) To: Andrew J Cosgriff, zsh-users On Mar 12, 12:27pm, Andrew J Cosgriff wrote: > Subject: Re: Call for neat examples > > TJL> But people have to submit some first :-) > > I submitted some stuff many years ago to the old webpages. I've sent several examples to TJL. Haven't seen them show up anywhere, though. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Call for neat examples 1998-03-12 2:02 ` Bart Schaefer @ 1998-03-14 18:51 ` Timothy J Luoma 0 siblings, 0 replies; 9+ messages in thread From: Timothy J Luoma @ 1998-03-14 18:51 UTC (permalink / raw) To: zsh-users Author: "Bart Schaefer" <schaefer@brasslantern.com> Original-Date: Wed, 11 Mar 1998 18:02:21 -0800 Message-ID: <980311180221.ZM21165@candle.brasslantern.com> > I've sent several examples to TJL. Haven't seen them show up anywhere, > though. That's true, and right now there are about 4 folks who have submitted stuff (Bart having submitted more than all other combined). I had to go out of town last week so I haven't had time to do anything with them, but I'll try to get something started this week. TjL ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~1998-03-14 19:06 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1998-02-28 1:17 Call for neat examples Timothy J Luoma 1998-02-28 10:30 ` Jimmy Mäkelä 1998-03-02 17:02 ` Sven Guckes 1998-03-04 2:13 ` Timothy J Luoma 1998-03-10 23:05 ` Sweth Chandramouli 1998-03-14 18:49 ` Timothy J Luoma 1998-03-12 1:27 ` Andrew J Cosgriff 1998-03-12 2:02 ` Bart Schaefer 1998-03-14 18:51 ` Timothy J Luoma
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).