zsh-workers
 help / color / mirror / code / Atom feed
From: Frank Terbeck <ft@bewatermyfriend.org>
To: zsh workers <zsh-workers@sunsite.dk>
Subject: zkbd fails: must be run as a function or shell script, not sourced
Date: Thu, 13 Mar 2008 21:27:48 +0100	[thread overview]
Message-ID: <20080313202748.GV30518@fsst.voodoo.lan> (raw)

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.

The last working commit that works is this:

  2007-05-28 13:08 pws
      23478: crash in reverse-menu-complete if no completion

And the next commit (the one that breaks it) is:

  2007-05-28 22:57 pws
      see 23479: add initial features support for modules

Since these are commits in a cvs->git conversion of the zsh tree, here
is some extra information to locate the change I'm referring to (in
case the conversion is not accurate enough):

The commit adds this Changelog entry:

[snip]
       * Not posted but see 23479:Completion/Unix/Command/_chmod,
       Completion/Unix/Command/_chown, Completion/Unix/Command/_cvs,
       Completion/Unix/Type/_list_files, Completion/Zsh/Command/_stat,
       Completion/Zsh/Command/_zstyle,
       Completion/Zsh/Type/_file_descriptors,Doc/Zsh/builtins.yo,
       Doc/Zsh/compsys.yo, Doc/Zsh/mod_stat.yo,
       Etc/zsh-development-guide, Src/builtin.c, Src/cond.c, Src/exec.c
       Src/init.c, Src/mkbltnmlst.sh, Src/mkmakemod.sh, Src/modentry.c,
       Src/module.c, Src/params.c, Src/zsh.h, Src/Builtins/rlimits.c,
       Src/Builtins/sched.c, Src/Modules/cap.c, Src/Modules/clone.c,
       Src/Modules/datetime.c, Src/Modules/example.c,
       Src/Modules/files.c, Src/Modules/langinfo.c,
       Src/Modules/langinfo.mdd, Src/Modules/mapfile.c,
       Src/Modules/mathfunc.c, Src/Modules/parameter.c,
       Src/Modules/pcre.c, Src/Modules/regex.c, Src/Modules/socket.c,
       Src/Modules/stat.c, Src/Modules/system.c, Src/Modules/tcp.c,
       Src/Modules/termcap.c, Src/Modules/terminfo.c, Src/Modules/zftp.c,
       Src/Modules/zprof.c, Src/Modules/zpty.c, Src/Modules/zselect.c,
       Src/Modules/zutil.c, Src/Zle/compctl.c, Src/Zle/complete.c,
       Src/Zle/complist.c, Src/Zle/computil.c, Src/Zle/deltochar.c,
       Src/Zle/zle_main.c, Src/Zle/zle_thingy.c, Src/Zle/zle_tricky.c,
       Src/Zle/zleparameter.c, Test/B02typeset.ztst,
       Test/V01zmodload.ztst, Test/V04features.ztst: add "zmodload -F"
       and internal features support for modules.
[snap]

Unfortunately, the commit is rather big, so I won't be able to find
the problematic part on my own. I did create a diff between the two
commits in question and uploaded it to:

  <http://ft.bewatermyfriend.org/tmp/zsh_breaks.diff>

I hope that helps.

Regards, Frank

-- 
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
                                                  -- RFC 1925


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-13 20:27 Frank Terbeck [this message]
2008-03-13 20:35 ` Mikael Magnusson
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=20080313202748.GV30518@fsst.voodoo.lan \
    --to=ft@bewatermyfriend.org \
    --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).