From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28206 invoked from network); 11 May 2005 18:33:16 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 11 May 2005 18:33:16 -0000 Received: (qmail 69290 invoked from network); 11 May 2005 18:33:02 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 May 2005 18:33:02 -0000 Received: (qmail 3560 invoked by alias); 11 May 2005 18:32:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8807 Received: (qmail 3549 invoked from network); 11 May 2005 18:32:55 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 11 May 2005 18:32:55 -0000 Received: (qmail 68393 invoked from network); 11 May 2005 18:32:55 -0000 Received: from hydrogen.ucsc.edu (128.114.41.29) by a.mx.sunsite.dk with SMTP; 11 May 2005 18:32:49 -0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by hydrogen.ucsc.edu (8.12.11/8.12.11) with ESMTP id j4BIR6QU002478; Wed, 11 May 2005 11:27:06 -0700 (PDT) In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <7b8af038c3699b3dc88c7212781bffe9@chemistry.ucsc.edu> Content-Transfer-Encoding: 7bit Cc: Motoi Washida From: William Scott Subject: Re: _mac_applications patch for Mac OS X 10.4 Date: Wed, 11 May 2005 11:32:50 -0700 To: zsh-users@sunsite.dk X-Mailer: Apple Mail (2.622) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-1.8 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -1.8 In _open I just have this: case "$state" in open_mac_applications) if [[ $OSTYPE[7] -ge '8' ]]; then _init_open_tiger else _init_open _alternative \ "commands: :_mac_applications" \ "files:: _open_absolute_application_path" fi ;; I wrote an augmented open function and hacked an _open completion for it based on Motoi's version. The open function and its dependencies are here: http://www.chemistry.ucsc.edu/%7Ewgscott/mystuff/zsh_tree.html This gives open a few extra (non-apple) arguments, like open -p to open preference panes, open -w to open widgets, open -x to open x11 apps, and so forth. Also I hacked the _fink completion function and made a function fink (same page) that updates the cache after an installation, update, and so on. Please feel free to incorporate and/or improve any of these. I wrote them to learn shell scripting so they are unlikely to be works of art. William G. Scott Associate Professor Department of Chemistry and Biochemistry and The Center for the Molecular Biology of RNA Sinsheimer Laboratories University of California at Santa Cruz Santa Cruz, California 95064 USA On May 11, 2005, at 8:42 AM, lists wrote: > After poking around some more, I think the best thing to do would be > to modify _retrieve_mac_apps() so that it uses Spotlight to find the > apps if you're running Tiger, and the old way if you're not running > Tiger. This way the apps would be found using Spotlight the first > time, then added to the cache so you don't have to keep using mdfind > every time you try to tab complete an app's name. Motoi, since you > are the expert on _retrieve_mac_apps() what do you think? > > -Ryan > > > On May 11, 2005, at 9:49 AM, lists wrote: > >> I've done some tweaking based on the submission in >> (thanks Scott and >> Wataru) and have put together a patch for _mac_applications which >> uses the _tiger_mac_applications function from the aforementioned >> submission (which I've renamed to _spotlight_mac_apps since Spotlight >> will probably be around after Tiger). _mac_applications will now use >> Spotlight (via _spotlight_mac_apps) if you're running Mac OS X 10.4, >> and will fall back to the old way if you're not. I'm also including >> the modified _spotlight_mac_apps function (which will now check for >> an Applications folder in your home directory as well). Please let >> me know if there are any problems/objections. >> >> Thanks, >> Ryan >> >> >> <_mac_applications.diff.gz> >> <_spotlight_mac_apps.gz> >> >