[MacPorts] #68638: bash @5.2.15: When a "command not found" situation happens, Bash prints errors and ends with "Abort Trap: 6" instead of printing "Command not found"
MacPorts
noreply at macports.org
Fri Sep 13 04:10:58 UTC 2024
#68638: bash @5.2.15: When a "command not found" situation happens, Bash prints
errors and ends with "Abort Trap: 6" instead of printing "Command not
found"
----------------------+----------------------
Reporter: some1so | Owner: raimue
Type: defect | Status: assigned
Priority: Normal | Milestone:
Component: ports | Version:
Resolution: | Keywords:
Port: bash |
----------------------+----------------------
Comment (by i0ntempest):
Replying to [comment:28 jamesderlin]:
> For anyone else looking for a simple, automatic workaround:
>
> The workaround from comment:11 (running `;` first) worked for me, but
it's not obvious how to suppress the error message so that it could be
done automatically in from `.bashrc`. The same thing applies to the
workaround from https://trac.macports.org/ticket/41248#comment:11 (running
`trap [a-z]` first). However, understanding that you just need to get
bash to print a localized message (not necessarily an ''error'' message),
generating the help to most bash builtins also should work (e.g. `cd
--help`, `set --help`, etc.), and those get printed to stdout which can be
easily redirected to `/dev/null`. In my `.bashrc`, I use: `help help >
/dev/null` (along with a comment referencing this bug).
Does not seem to work for me. I put the command into `.profile` but I
still get a crash when I run a nonexistent command. Running the command in
the shell after initialization does work though.
--
Ticket URL: <https://trac.macports.org/ticket/68638#comment:29>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list