summaryrefslogtreecommitdiff
path: root/Src
diff options
context:
space:
mode:
Diffstat (limited to 'Src')
-rw-r--r--Src/init.c5
-rw-r--r--Src/options.c1
-rw-r--r--Src/zsh.h1
3 files changed, 7 insertions, 0 deletions
diff --git a/Src/init.c b/Src/init.c
index 123e20e85..812cd8409 100644
--- a/Src/init.c
+++ b/Src/init.c
@@ -1126,6 +1126,11 @@ source(char *s)
scriptname = s;
scriptfilename = s;
+ if (isset(SOURCETRACE)) {
+ printprompt4();
+ fprintf(xtrerr ? xtrerr : stderr, "<sourcetrace>\n");
+ }
+
/*
* The special return behaviour of traps shouldn't
* trigger in files sourced from traps; the return
diff --git a/Src/options.c b/Src/options.c
index a5f299e49..705546699 100644
--- a/Src/options.c
+++ b/Src/options.c
@@ -233,6 +233,7 @@ static struct optname optns[] = {
{{NULL, "shwordsplit", OPT_EMULATE|OPT_BOURNE}, SHWORDSPLIT},
{{NULL, "singlecommand", OPT_SPECIAL}, SINGLECOMMAND},
{{NULL, "singlelinezle", OPT_KSH}, SINGLELINEZLE},
+{{NULL, "sourcetrace", 0}, SOURCETRACE},
{{NULL, "sunkeyboardhack", 0}, SUNKEYBOARDHACK},
{{NULL, "transientrprompt", 0}, TRANSIENTRPROMPT},
{{NULL, "trapsasync", 0}, TRAPSASYNC},
diff --git a/Src/zsh.h b/Src/zsh.h
index 060f8a6d4..f2bab06fd 100644
--- a/Src/zsh.h
+++ b/Src/zsh.h
@@ -1999,6 +1999,7 @@ enum {
SHWORDSPLIT,
SINGLECOMMAND,
SINGLELINEZLE,
+ SOURCETRACE,
SUNKEYBOARDHACK,
TRANSIENTRPROMPT,
TRAPSASYNC,