From 09960dc5b966fb1a1c20a0af654165e5981a999b Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Wed, 12 May 2010 10:06:59 +0000 Subject: 27951: Add $ZSH_EVAL_CONTEXT and $zsh_eval_contxt --- Doc/Zsh/params.yo | 94 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) (limited to 'Doc/Zsh/params.yo') diff --git a/Doc/Zsh/params.yo b/Doc/Zsh/params.yo index 99a6e6958..55d5cda6a 100644 --- a/Doc/Zsh/params.yo +++ b/Doc/Zsh/params.yo @@ -722,6 +722,100 @@ vindex(VENDOR) item(tt(VENDOR))( The vendor, as determined at compile time. ) +vindex(zsh_eval_context) +vindex(ZSH_EVAL_CONTEXT) +item(tt(zsh_eval_context) (tt(ZSH_EVAL_CONTEXT) ))( +An array (colon-separated list) indicating the context of shell +code that is being run. Each time a piece of shell code that +is stored within the shell is executed a string is temporarily appended to +the array to indicate the type of operation that is being performed. +Read in order the array gives an indication of the stack of +operations being performed with the most immediate context last. + +The context is one of the following: +startitem() +item(tt(cmdarg))( +Code specified by the tt(-c) option to the command line that invoked +the shell. +) +item(tt(cmdsubst))( +Command substitution using the tt(`)var(...)tt(`) or +tt($+LPAR())var(...)tt(RPAR()) construct. +) +item(tt(equalsubst))( +File substitution using the tt(=+LPAR())var(...)tt(RPAR()) construct. +) +item(tt(eval))( +Code executed by the tt(eval) builtin. +) +item(tt(evalautofunc))( +Code executed with the tt(KSH_AUTOLOAD) mechanism in order to define +an autoloaded function. +) +item(tt(fc))( +Code from the shell history executed by the tt(-e) option to the tt(fc) +builtin. +) +item(tt(file))( +Lines of code being read directly from a file, for example by +the tt(source) builtin. +) +item(tt(filecode))( +Lines of code being read from a tt(.zwc) file instead of directly +from the source file. +) +item(tt(globqual))( +Code executed by the tt(e) or tt(+) glob qualifier. +) +item(tt(globsort))( +Code executed to order files by the tt(o) glob qualifier. +) +item(tt(insubst))( +File substitution using the tt(LPAR())var(...)tt(RPAR()) construct. +) +item(tt(sched))( +Code executed by the tt(sched) builtin. +) +item(tt(shfunc))( +A shell function. +) +item(tt(stty))( +Code passed to tt(stty) by the tt(STTY) environment variable. +Normally this is passed directly to the system's tt(stty) command, +so this value is unlikely to be seen in practice. +) +item(tt(style))( +Code executed as part of a style retrieved by the tt(zstyle) builtin +from the tt(zsh/zutil) module. +) +item(tt(toplevel))( +The highest execution level of a script or interactive shell. +) +item(tt(trap))( +Code executed as a trap defined by the tt(trap) builtin. Traps +defined as functions have the context tt(shfunc). As traps are +asynchronous they may have a different hierarchy from other +code. +) +item(tt(zpty))( +Code executed by the tt(zpty) builtin from the tt(zsh/zpty) module. +) +item(tt(zregesparse-guard))( +Code executed as a guard by the tt(zregexparse) command from the +tt(zsh/zutil) module. +) +item(tt(zregexparse-action))( +Code executed as an action by the tt(zregexparse) command from the +tt(zsh/zutil) module. +) +enditem() +) vindex(ZSH_NAME) item(tt(ZSH_NAME))( Expands to the basename of the command used to invoke this instance -- cgit 1.4.1