zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] add-zle-hook-widget
Date: Wed, 22 Jun 2016 13:25:41 -0700	[thread overview]
Message-ID: <160622132541.ZM12746@torch.brasslantern.com> (raw)
In-Reply-To: <20160621014130.GA17100@tarsus.local2>

On Jun 21,  1:41am, Daniel Shahaf wrote:
} Subject: Re: [PATCH] add-zle-hook-widget
}
} > I'm not sure there's a way to make it safe for all three of autoload +X,
} > source, and kshautoload.
} 
} Wouldn't the following work?
} 
} $ cat f
} f() { echo I have been called with "$@" }
} if [[ "$zsh_eval_context" != *\ file && ! -o kshautoload ]]; then
}     f "$@"
} fi

I don't think this correctly handles the case where "autoload -k" is used
but kshautoload is not actually set when the function is first called.
There's also the reverse case, where kshautoload IS set but the function
was declared with "autoload -z", to be considered.


  reply	other threads:[~2016-06-22 20:25 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-13  1:44 Bart Schaefer
2016-06-13  8:52 ` Daniel Shahaf
2016-06-14 18:10   ` Bart Schaefer
2016-06-14 21:06     ` Bart Schaefer
2016-06-15 23:24     ` Daniel Shahaf
2016-06-17  5:20       ` Bart Schaefer
2016-06-18 23:25         ` Bart Schaefer
2016-06-21  1:41           ` Daniel Shahaf
2016-06-21 22:58             ` Bart Schaefer
2016-06-21  1:41         ` Daniel Shahaf
2016-06-22 20:25           ` Bart Schaefer [this message]
2016-07-01  5:11             ` Daniel Shahaf
2016-07-01 20:11           ` Bart Schaefer
2016-07-05  4:57             ` Daniel Shahaf
2016-07-14  7:45               ` 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=160622132541.ZM12746@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@zsh.org \
    /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).