* _retrieve_mac_apps bad chache problem
@ 2005-06-12 2:51 Marco Zunino
2005-06-12 4:38 ` William Scott
2005-07-03 1:36 ` metadata completion functions for OS X 10.4 William Scott
0 siblings, 2 replies; 3+ messages in thread
From: Marco Zunino @ 2005-06-12 2:51 UTC (permalink / raw)
To: zsh-users
Please Help!!!
After I reinstalled Mac OS Tiger, when I try to do to
"open -a " + TAB
instead of the standard completiotion I get a hugly
series of line like:
_retrieve_mac_apps:20: permission denied: .DS_Store
_retrieve_mac_apps:20: permission denied:
Finder_Toolbar_Applications.dmg
This happens only in my main user account and only the
first time I try "open -a" after opening a shell. I
guess that the reason is that zsh try to create a
cache but due to a bad permission it can't, but I can
not guess where to remove this file.
If you can, please ***HELP***
Pax Vobiscum,
Marco Zunino
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: _retrieve_mac_apps bad chache problem
2005-06-12 2:51 _retrieve_mac_apps bad chache problem Marco Zunino
@ 2005-06-12 4:38 ` William Scott
2005-07-03 1:36 ` metadata completion functions for OS X 10.4 William Scott
1 sibling, 0 replies; 3+ messages in thread
From: William Scott @ 2005-06-12 4:38 UTC (permalink / raw)
To: Marco Zunino; +Cc: zsh-users
Hi Marco:
In 10.4 you can avoid the cache altogether, as mdfind is sufficiently fast
to allow real-time completions for open -a. I did however notice that the
very first time there is about a 10 second lag, which raises my blood
pressure, so I found running the mdfind command in the background upon
shell initialization speeds things up.
I implemented this hack in what is doubltess substandard code, but if you
want to play with it, _open, an augmented open function, and a few others
are here for the taking:
http://xanana.ucsc.edu/Library/init/zsh/local-functions/darwin/
HTH,
Bill Scott
On Sat, 11 Jun 2005, Marco Zunino wrote:
> Please Help!!!
>
> After I reinstalled Mac OS Tiger, when I try to do to
>
> "open -a " + TAB
>
> instead of the standard completiotion I get a hugly
> series of line like:
>
> _retrieve_mac_apps:20: permission denied: .DS_Store
> _retrieve_mac_apps:20: permission denied:
> Finder_Toolbar_Applications.dmg
>
> This happens only in my main user account and only the
> first time I try "open -a" after opening a shell. I
> guess that the reason is that zsh try to create a
> cache but due to a bad permission it can't, but I can
> not guess where to remove this file.
>
> If you can, please ***HELP***
>
> Pax Vobiscum,
>
> Marco Zunino
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: metadata completion functions for OS X 10.4
2005-06-12 2:51 _retrieve_mac_apps bad chache problem Marco Zunino
2005-06-12 4:38 ` William Scott
@ 2005-07-03 1:36 ` William Scott
1 sibling, 0 replies; 3+ messages in thread
From: William Scott @ 2005-07-03 1:36 UTC (permalink / raw)
To: zsh-users; +Cc: William Scott
Hi folks:
I am trying to write some completion functions for the new metadata
utilities distributed with Mac OS X v. 10.4.x. that make fast searches
possible.
Currently I have a simple one for the mdls command that seems to behave:
http://xanana.ucsc.edu/Library/init/zsh/local-functions/darwin/_mdls
The one I am trying to write for _mdfind isn't very good currently, and
could benefit from someone who really knows what they are doing having a
look at it:
http://xanana.ucsc.edu/Library/init/zsh/local-functions/darwin/_mdfind
Hopefully the comments at the top give the basic idea. It suffers from
several problems that I am sure are straightforward for people who
understand this stuff better than I do.
1. In my _mdls function, I have some zstyles at the top that work
straight away. But in the _mdfind function, they don't kick in until the
second time it is invoked.
2. There are two types of commands one can issue with mdfind that don't
have -x type arguments, eg:
mdfind "kMDItemContentType == '<any string>'"
mdfind <any string>
I'm not sure how to differentiate between the two types of commands.
What I have sort of works, but it seems quite clunky and amaturish.
3. For completions of the command of the form
mdfind "kMDItemContentType == '<any string>'"
I am using compadd -P \" -p kMDItem -S " == '" to add in the
first set of double-quotes, then the constant prefix kMDItem and then a
suffix == ' but I am not sure how to prompt for the string and then
automatically close first the single quote and then the double quote.
Also occasionally I seem to wind up with
mdfind """kMDItemContentType == '"
If anyone has suggestions or could point me toward relevant examples I
would be grateful.
Thanks in advance.
Bill Scott
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-07-03 1:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-06-12 2:51 _retrieve_mac_apps bad chache problem Marco Zunino
2005-06-12 4:38 ` William Scott
2005-07-03 1:36 ` metadata completion functions for OS X 10.4 William Scott
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).