zsh-workers
 help / color / mirror / code / Atom feed
* zkbd fails: must be run as a function or shell script, not sourced
@ 2008-03-13 20:27 Frank Terbeck
  2008-03-13 20:35 ` Mikael Magnusson
  2008-03-13 23:28 ` Bart Schaefer
  0 siblings, 2 replies; 5+ messages in thread
From: Frank Terbeck @ 2008-03-13 20:27 UTC (permalink / raw)
  To: zsh workers

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-03-14 19:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-13 20:27 zkbd fails: must be run as a function or shell script, not sourced Frank Terbeck
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

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).