Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] add-zle-hook-widget
- X-seq: zsh-workers 38750
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] add-zle-hook-widget
- Date: Wed, 22 Jun 2016 13:25:41 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=dJ4C1YBZuIMLB574aoBgTcfc2Z+MHmjVaBNHl7czzvs=; b=k+JrFEnpl9OzUUDB9FtaU0H93xik1b2sR0nqZj9kin4JDpqE65aFfDiciMojTEbGv/ N28l9gydgXHxYOCZIlJEXfO2/1+2lzDzMwGwrHVdRH/s8YIa0C4ct5GGZxv/797leZKf pygRxnkE9eKEVzhY3xM/ZSV5CP6Vl+tQjeJ35eeL+hjcIUL10i86U+pjwvXB7UbaLqWZ ti+SEUdZgYTgtFBljzHLb+CtUO4UJaL0M4rK3F0PUt/F362gKS9RlZd8yHHHQ1KrM2xd ZM/uVxO7jr++kdFuKlIEzlEOR2EC3Img93fUvaMTy3R29WUoNUQt6mH3zFmS1pUKFwni gsLg==
- In-reply-to: <20160621014130.GA17100@tarsus.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <160612184453.ZM11316@torch.brasslantern.com> <20160613085219.GA23148@tarsus.local2> <160614111054.ZM17893@torch.brasslantern.com> <20160615232447.GA29225@tarsus.local2> <160616222055.ZM27034@torch.brasslantern.com> <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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author