Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
zkbd fails: must be run as a function or shell script, not sourced
- X-seq: zsh-workers 24706
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxxxxx>
- Subject: zkbd fails: must be run as a function or shell script, not sourced
- Date: Thu, 13 Mar 2008 21:27:48 +0100
- Mail-followup-to: zsh workers <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author