Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zkbd fails: must be run as a function or shell script, not sourced
- X-seq: zsh-workers 24707
- From: "Mikael Magnusson" <mikachu@xxxxxxxxx>
- To: "zsh workers" <zsh-workers@xxxxxxxxxx>
- Subject: Re: zkbd fails: must be run as a function or shell script, not sourced
- Date: Thu, 13 Mar 2008 21:35:36 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=m+pUU/hAIvqaiFuS535LvYnCDdQ9LKNEsHstvfOD44Q=; b=T46qZs9cJWdkQ4t0OXoD96PqOxSUEu4ao1lnvzzibx/RzFBZzkxPBvYLKrlmqzPnYT37PSlLb5Z8GymlQioDI8fO1Q9kKbbVwnDrAIpHACNnu/NTpP8qc7cIWhxM2/pSRjFzvkG9Nd8JzUKTfsCu5q8LAkiLEsPhTXRKWLzfWwg=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Gz6wFKkRZ/7p0aSERttY5GxzvrahywIHu938I/PqJSqnijPRhMYsoO54ZDffLgl6nso4X/tyvQwyiUg3xForMcN1hpr1GJtQYU48JXb8ablKETPeaxaPFeM4azCCB7beMyxGz67OVxQf1xR9Eh34rf0qd6RmetElLRjG6W338gs=
- In-reply-to: <20080313202748.GV30518@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080313202748.GV30518@xxxxxxxxxxxxxxx>
On 13/03/2008, Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
> Hi workers,
>
> The zkbd function currently fails to start. In particular, it seems to
> be the following test (I don't actually understand how that test works
> at all :-):
>
> [snip]
> [[ -o interactive ]] && {
> local -i ARGC
> (ARGC=0) 2>/dev/null || {
> print -u2 ${0}: must be run as a function or shell script, not sourced
> return 1
> }
> }
> [snap]
>
> Since this worked before, I git-bisected my way through the younger
> zsh code history and I was able to find the commit that breaks it for
> me.
fwiw, with current cvs i get this, which seems to be the intended result:
{21:31:03|~}% zsh .zsh/zkbd
Enter current terminal type: [rxvt-unicode]
{21:31:07|~}% source .zsh/zkbd
.zsh/zkbd: must be run as a function or shell script, not sourced
{21:31:09|~}% .zsh/zkbd
zsh: command not found: .zsh/zkbd
{21:31:12|~}% +x .zsh/zkbd
{21:31:12|~}% .zsh/zkbd
Enter current terminal type: [rxvt-unicode]
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author