zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>,
	zsh-workers@sunsite.auc.dk
Subject: Re: Problems with the functions[] parameter (not; but other issues)
Date: Fri, 10 Mar 2000 12:03:22 +0000	[thread overview]
Message-ID: <1000310120322.ZM14944@candle.brasslantern.com> (raw)
In-Reply-To: <200003100949.KAA03121@beta.informatik.hu-berlin.de>

On Mar 10, 10:49am, Sven Wischnowsky wrote:
} Subject: Re: Problems with the functions[] parameter
}
} Bart Schaefer wrote:
} 
} > I think that wordcode storage of functions has messed up the functions[]
} > assoc from the parameter module.  The value of functions[something] no
} > longer accurately reflects the current state of the function `something'
} 
} Seems to work fine for me both with read and mapped wordcode
} files... could you give me an example?

It's me being silly.  I just figured out that the function I was editing
(to change "autoload -XU" to "autoload -XUt") was being referenced inside
a $(...), so of course the autoload doesn't replace the actual definition
in the parent.

Which leads me to two observations ...

(1) autoloading the _call function (for example) is inefficient; it is
    never used except in $(...), which means it is reloaded every time.
    Would it be useful to use e.g.

    	#autoload +X

   at the top of such files?  To mean, "load this as soon as compinit
   sees it, don't wait for it to be executed via $fpath."  (But what
   would that mean for compdump?)

(2) Redirecting stderr of a function is a bit inconsistent with respect
    to xtrace.  Zsh presently works the same way bash does, which means
    the xtrace output of shell functions is *not* redirected along with
    their stderr.  This is not the same as e.g. `do'-loops and { ... }.

And (2) in turn leads me to notice a third thing:

In bash, redirecting the standard error of the `.' command redirects
the xtrace output from the commands in the sourced file.  This doesn't
presently happen in zsh, but I think the zsh behavior is more useful;
other opinions?  Is compatibility more important?  What does ksh do?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


  reply	other threads:[~2000-03-10 12:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-03-10  9:49 Problems with the functions[] parameter Sven Wischnowsky
2000-03-10 12:03 ` Bart Schaefer [this message]
2000-03-10 12:45 Problems with the functions[] parameter (not; but other issues) Sven Wischnowsky
2000-03-11 18:14 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1000310120322.ZM14944@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=wischnow@informatik.hu-berlin.de \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).