From 9650b471d0b04aa817090569306326cd62de8c3d Mon Sep 17 00:00:00 2001 From: wileyhy <84648683+wileyhy@users.noreply.github.com> Date: Mon, 12 Jun 2023 09:26:45 -0700 Subject: [PATCH] In exceptions section, added example of PS4 --- SC2016.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/SC2016.md b/SC2016.md index 500967d..899d018 100644 --- a/SC2016.md +++ b/SC2016.md @@ -36,6 +36,11 @@ If you know that you want the expression literally without expansion, you can [[ echo 'PATH=$PATH:/usr/local/bin' >> ~/.bashrc ``` +``` +# We also want this variable to output $BASH_SOURCE:$LIN... during an execution trace. +PS4='+$BASH_SOURCE:$LINENO:$FUNCNAME: ' +``` + ShellCheck also does not warn about escaped expansions in double quotes: ```