zsh-workers
 help / color / mirror / code / Atom feed
From: "Mikael Magnusson" <mikachu@gmail.com>
To: "zsh workers" <zsh-workers@sunsite.dk>
Subject: Re: zkbd fails: must be run as a function or shell script, not sourced
Date: Thu, 13 Mar 2008 21:35:36 +0100	[thread overview]
Message-ID: <237967ef0803131335u6744a78s3387671ad33c32e8@mail.gmail.com> (raw)
In-Reply-To: <20080313202748.GV30518@fsst.voodoo.lan>

On 13/03/2008, Frank Terbeck <ft@bewatermyfriend.org> 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


  reply	other threads:[~2008-03-13 20:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 20:27 Frank Terbeck
2008-03-13 20:35 ` Mikael Magnusson [this message]
2008-03-13 20:52   ` Frank Terbeck
2008-03-13 23:28 ` Bart Schaefer
2008-03-14 19:57   ` Peter Stephenson

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=237967ef0803131335u6744a78s3387671ad33c32e8@mail.gmail.com \
    --to=mikachu@gmail.com \
    --cc=zsh-workers@sunsite.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).