mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-12-08 06:21:40 +01:00
27638, based on Frank Terbeck, 27633: SOURCETRACE option
This commit is contained in:
parent
b49746d827
commit
06b7029aa8
5 changed files with 31 additions and 2 deletions
|
|
@ -1,3 +1,9 @@
|
||||||
|
2010-01-27 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||||
|
|
||||||
|
* 27638, based on Frank Terbeck, 27633: Doc/Zsh/options.yo,
|
||||||
|
init.c, options.c, zsh.h: add SOURCE_TRACE option with output
|
||||||
|
similar to XTRACE for tracing sourced files.
|
||||||
|
|
||||||
2010-01-23 Clint Adams <clint@zsh.org>
|
2010-01-23 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
* 27617: Completion/Unix/Command/_graphicsmagick: graphicsmagick
|
* 27617: Completion/Unix/Command/_graphicsmagick: graphicsmagick
|
||||||
|
|
@ -12633,5 +12639,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.4872 $
|
* $Revision: 1.4873 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
||||||
|
|
@ -1584,6 +1584,18 @@ Sequences of digits indicating a numeric base such as the `tt(08)'
|
||||||
component in `tt(08#77)' are always interpreted as decimal, regardless
|
component in `tt(08#77)' are always interpreted as decimal, regardless
|
||||||
of leading zeroes.
|
of leading zeroes.
|
||||||
)
|
)
|
||||||
|
pindex(SOURCE_TRACE)
|
||||||
|
pindex(NO_SOURCE_TRACE)
|
||||||
|
pindex(SOURCETRACE)
|
||||||
|
pindex(NOSOURCETRACE)
|
||||||
|
item(tt(SOURCE_TRACE))(
|
||||||
|
If set, zsh will print an informational message announcing the name of
|
||||||
|
each file it loads. The format of the output is similar to that
|
||||||
|
for the tt(XTRACE) option, with the message tt(<sourcetrace>).
|
||||||
|
A file may be loaded by the shell itself when it
|
||||||
|
starts up and shuts down (tt(Startup/Shutdown Files)) or by the use of
|
||||||
|
the `tt(source)' and `tt(dot)' builtin commands.
|
||||||
|
)
|
||||||
pindex(TYPESET_SILENT)
|
pindex(TYPESET_SILENT)
|
||||||
pindex(NO_TYPESET_SILENT)
|
pindex(NO_TYPESET_SILENT)
|
||||||
pindex(TYPESETSILENT)
|
pindex(TYPESETSILENT)
|
||||||
|
|
@ -1610,7 +1622,11 @@ pindex(NOXTRACE)
|
||||||
cindex(tracing, of commands)
|
cindex(tracing, of commands)
|
||||||
cindex(commands, tracing)
|
cindex(commands, tracing)
|
||||||
item(tt(XTRACE) (tt(-x), ksh: tt(-x)))(
|
item(tt(XTRACE) (tt(-x), ksh: tt(-x)))(
|
||||||
Print commands and their arguments as they are executed.
|
Print commands and their arguments as they are executed. The
|
||||||
|
output is proceded by the value of tt($PS4), formatted as described
|
||||||
|
in
|
||||||
|
ifzman(the section EXPANSION OF PROMPT SEQUENCES in zmanref(zshmisc))\
|
||||||
|
ifnzman(noderef(Prompt Expansion)).
|
||||||
)
|
)
|
||||||
enditem()
|
enditem()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1126,6 +1126,11 @@ source(char *s)
|
||||||
scriptname = s;
|
scriptname = s;
|
||||||
scriptfilename = s;
|
scriptfilename = s;
|
||||||
|
|
||||||
|
if (isset(SOURCETRACE)) {
|
||||||
|
printprompt4();
|
||||||
|
fprintf(xtrerr ? xtrerr : stderr, "<sourcetrace>\n");
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The special return behaviour of traps shouldn't
|
* The special return behaviour of traps shouldn't
|
||||||
* trigger in files sourced from traps; the return
|
* trigger in files sourced from traps; the return
|
||||||
|
|
|
||||||
|
|
@ -233,6 +233,7 @@ static struct optname optns[] = {
|
||||||
{{NULL, "shwordsplit", OPT_EMULATE|OPT_BOURNE}, SHWORDSPLIT},
|
{{NULL, "shwordsplit", OPT_EMULATE|OPT_BOURNE}, SHWORDSPLIT},
|
||||||
{{NULL, "singlecommand", OPT_SPECIAL}, SINGLECOMMAND},
|
{{NULL, "singlecommand", OPT_SPECIAL}, SINGLECOMMAND},
|
||||||
{{NULL, "singlelinezle", OPT_KSH}, SINGLELINEZLE},
|
{{NULL, "singlelinezle", OPT_KSH}, SINGLELINEZLE},
|
||||||
|
{{NULL, "sourcetrace", 0}, SOURCETRACE},
|
||||||
{{NULL, "sunkeyboardhack", 0}, SUNKEYBOARDHACK},
|
{{NULL, "sunkeyboardhack", 0}, SUNKEYBOARDHACK},
|
||||||
{{NULL, "transientrprompt", 0}, TRANSIENTRPROMPT},
|
{{NULL, "transientrprompt", 0}, TRANSIENTRPROMPT},
|
||||||
{{NULL, "trapsasync", 0}, TRAPSASYNC},
|
{{NULL, "trapsasync", 0}, TRAPSASYNC},
|
||||||
|
|
|
||||||
|
|
@ -1999,6 +1999,7 @@ enum {
|
||||||
SHWORDSPLIT,
|
SHWORDSPLIT,
|
||||||
SINGLECOMMAND,
|
SINGLECOMMAND,
|
||||||
SINGLELINEZLE,
|
SINGLELINEZLE,
|
||||||
|
SOURCETRACE,
|
||||||
SUNKEYBOARDHACK,
|
SUNKEYBOARDHACK,
|
||||||
TRANSIENTRPROMPT,
|
TRANSIENTRPROMPT,
|
||||||
TRAPSASYNC,
|
TRAPSASYNC,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue