zsh-workers
 help / color / mirror / code / Atom feed
* Re: Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?]
       [not found] <237967ef0605111440w2c2f37c1j6ccca5188d680e2f@mail.gmail.com>
@ 2006-05-12  9:52 ` Peter Stephenson
  2006-05-12 18:21   ` CVS got turned into a newt! (It got better) Wayne Davison
  2006-05-12 21:58   ` Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?] Mikael Magnusson
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Stephenson @ 2006-05-12  9:52 UTC (permalink / raw)
  To: Zsh hackers list

"Mikael Magnusson" <mikachu@gmail.com> wrote:
> One thing that has annoyed me recently is that 'stat <tab> autoloads
> zsh/stat without me asking for it, I never know which stat version is
> loaded and the options aren't compatible. Should I live with it and
> alias stat=command stat or is it a bug in the completer? If i have the
> alias and load the module manually i'll still use the command so it's
> still not a perfect solution.

The stat completion itself appears not to require zsh/stat, but it's used
elsewhere.  Quite possibly the culprit is my _list_files addition, which
loads the module even if you're not using the feature.  Does the following
help?  (CVS is unwell)

--- Completion/Unix/Type/_list_files.old	2006-05-12 10:40:39.000000000 +0100
+++ Completion/Unix/Type/_list_files	2006-05-12 10:40:34.000000000 +0100
@@ -15,8 +15,6 @@
 listfiles=()
 listopts=()
 
-zmodload -i zsh/stat 2>/dev/null || return 1
-
 zstyle -a ":completion:${curcontext}:" file-list stylevals || return 1
 
 # TODO: more flexible way of handling the following?  e.g. use $compstate?
@@ -48,6 +46,8 @@
 
 (( ok )) || return 1
 
+zmodload -i zsh/stat 2>/dev/null || return 1
+
 for f in ${(P)1}; do
   if [[ ! -e "${2:+$2/}$f" ]]; then
     listfiles+=("${2:+$2/}$f")


-- 
Peter Stephenson <pws@csr.com>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070


To access the latest news from CSR copy this link into a web browser:  http://www.csr.com/email_sig.php


^ permalink raw reply	[flat|nested] 4+ messages in thread

* CVS got turned into a newt! (It got better)
  2006-05-12  9:52 ` Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?] Peter Stephenson
@ 2006-05-12 18:21   ` Wayne Davison
  2006-05-12 22:19     ` Mikael Magnusson
  2006-05-12 21:58   ` Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?] Mikael Magnusson
  1 sibling, 1 reply; 4+ messages in thread
From: Wayne Davison @ 2006-05-12 18:21 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

On Fri, May 12, 2006 at 10:52:23AM +0100, Peter Stephenson wrote:
> (CVS is unwell)

CVS is feeling a little better today.  If you already have a zsh
checkout, edit the main CVS/Root file and add a "zsh." prefix in
front of the cvs.sourceforge.net hostname, like this:

:ext:YOUR_USERNAME@zsh.cvs.sourceforge.net:/cvsroot/zsh

or (so I have read) this:

:pserver:anonymous@zsh.cvs.sourceforge.net:/cvsroot/zsh

Then, copy the updated file into all the other CVS dirs:

for root in **/CVS; cp -p CVS/Root $root

After that, you should be able to access zsh's cvs again.

..wayne..


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?]
  2006-05-12  9:52 ` Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?] Peter Stephenson
  2006-05-12 18:21   ` CVS got turned into a newt! (It got better) Wayne Davison
@ 2006-05-12 21:58   ` Mikael Magnusson
  1 sibling, 0 replies; 4+ messages in thread
From: Mikael Magnusson @ 2006-05-12 21:58 UTC (permalink / raw)
  To: Peter Stephenson; +Cc: Zsh hackers list

On 5/12/06, Peter Stephenson <pws@csr.com> wrote:
> "Mikael Magnusson" <mikachu@gmail.com> wrote:
> > One thing that has annoyed me recently is that 'stat <tab> autoloads
> > zsh/stat without me asking for it, I never know which stat version is
> > loaded and the options aren't compatible. Should I live with it and
> > alias stat=command stat or is it a bug in the completer? If i have the
> > alias and load the module manually i'll still use the command so it's
> > still not a perfect solution.
>
> The stat completion itself appears not to require zsh/stat, but it's used
> elsewhere.  Quite possibly the culprit is my _list_files addition, which
> loads the module even if you're not using the feature.  Does the following
> help?  (CVS is unwell)
>
> --- Completion/Unix/Type/_list_files.old        2006-05-12 10:40:39.000000000 +0100
> +++ Completion/Unix/Type/_list_files    2006-05-12 10:40:34.000000000 +0100
> @@ -15,8 +15,6 @@
>  listfiles=()
>  listopts=()
>
> -zmodload -i zsh/stat 2>/dev/null || return 1
> -
>  zstyle -a ":completion:${curcontext}:" file-list stylevals || return 1
>
>  # TODO: more flexible way of handling the following?  e.g. use $compstate?
> @@ -48,6 +46,8 @@
>
>  (( ok )) || return 1
>
> +zmodload -i zsh/stat 2>/dev/null || return 1
> +
>  for f in ${(P)1}; do
>    if [[ ! -e "${2:+$2/}$f" ]]; then
>      listfiles+=("${2:+$2/}$f")

That seems to do the trick here.

PS Sorry about sending the reply privately, I'm not so used to gmail
and mailing lists, it defaults to private replies, and reply to all
cc:s the list instead of the sender...

-- 
Mikael Magnusson

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: CVS got turned into a newt! (It got better)
  2006-05-12 18:21   ` CVS got turned into a newt! (It got better) Wayne Davison
@ 2006-05-12 22:19     ` Mikael Magnusson
  0 siblings, 0 replies; 4+ messages in thread
From: Mikael Magnusson @ 2006-05-12 22:19 UTC (permalink / raw)
  To: Wayne Davison; +Cc: Peter Stephenson, Zsh hackers list

On 5/12/06, Wayne Davison <wayned@users.sourceforge.net> wrote:
> On Fri, May 12, 2006 at 10:52:23AM +0100, Peter Stephenson wrote:
> > (CVS is unwell)
>
> CVS is feeling a little better today.  If you already have a zsh
> checkout, edit the main CVS/Root file and add a "zsh." prefix in
> front of the cvs.sourceforge.net hostname, like this:
>
> :ext:YOUR_USERNAME@zsh.cvs.sourceforge.net:/cvsroot/zsh
>
> or (so I have read) this:
>
> :pserver:anonymous@zsh.cvs.sourceforge.net:/cvsroot/zsh
>
> Then, copy the updated file into all the other CVS dirs:
>
> for root in **/CVS; cp -p CVS/Root $root
>
> After that, you should be able to access zsh's cvs again.
>
> ..wayne..

or even quicker,
sed -i s/@c/@zsh.c/ **/CVS/Root

-- 
Mikael Magnusson

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-12 22:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <237967ef0605111440w2c2f37c1j6ccca5188d680e2f@mail.gmail.com>
2006-05-12  9:52 ` Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?] Peter Stephenson
2006-05-12 18:21   ` CVS got turned into a newt! (It got better) Wayne Davison
2006-05-12 22:19     ` Mikael Magnusson
2006-05-12 21:58   ` Tabcomplete autoloads zsh/stat [was: Re: File locking within zsh?] Mikael Magnusson

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).