[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
Thu Aug 29 20:46:21 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 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).
--
Ticket URL: <https://trac.macports.org/ticket/68638#comment:28>
MacPorts <https://www.macports.org/>
Ports system for macOS
More information about the macports-tickets
mailing list