On Thu 30 Jan 2025 at 05:52:02 (-0800), Will Mengarini wrote: > * Roger Price <deb...@rogerprice.org> [25-01/30=Th 13:59 +0100]: > > $wrongCodeForCheckingWhetherAliasExists && unalias w3m > > When I want to unalias something that might already be unaliased (as > when it's in .bashrc), I just code > unalias foo 2>/dev/null > because file descriptor 2 is the standard error output.
Add || true to avoid a non-zero exit status. Cheers, David.