I upgraded to Linux Mint 21 (based on Ubuntu 22), having number of small issues, one of which is in VS Code, not in Terminal (gnome-terminal), running ls alias:
bash: printf: `Y': invalid format character
While I have defined these aliases:
# Base `ls` alias contains:
# - escape for it could be defined already
# - use colors when appropriate
# - group directories first
# - date format YYYY-Mmm-DD
alias ls="\ls --color=auto --group-directories-first --time-style=+'%Y-%b-%d'"
I did not notice this behavior in Focal, maybe I just look for errors now, or is this truly some error (mine, whoever)?
Notes:
https://www.gnu.org/software/coreutils/manual/html_node/Date-conversion-specifiers.html
$ type -a ls
ls is aliased to `\ls --color=auto --group-directories-first --time-style=+'%Y-%b-%d''
ls is /usr/bin/ls
ls is /bin/ls
Both in Terminal and VS Code.
printf %q\\n "PS1=$PS1" "PS2=$PS2" "PS3=$PS3" "PS4=$PS4" "PROMPT_COMMAND=$PROMPT_COMMAND"
PS1=\\\[\\e\]0\;\ \\w\ \\a\\\]\\\[\$color_green\\\]\\\$\ \\\[\$color_reset\\\]
PS2=\>\
PS3=
PS4=+\
PROMPT_COMMAND=
Only in VS Code (nothing in Terminal):
trap -p DEBUG
trap -- '__vsc_preexec_only "$_"' DEBUG
Image re-post from the original revision:

trap -p DEBUG? And do you see the expected output fromlsor not (actually, I think depending on the configuration the command might not be executed if the DEBUG trap fails, so that would still be consistent)?printf "... %s ..." "$__vsc_current_command", they've added a call tosedto escape the%signs. Sigh. Well, at least someone has noted that in the bug report. (Also it doesn't look like__vsc_preexec_onlyuses the argument it gets anyway, hmm)lsoutput after the error message. You should edit your question to restore that information.