Unfortunately certain commands like `rg` will return non-zero by design when there are no matches, which could be an intentional outcome.
Suicide Linux (2009)
61–70 of 73 posts
Re: Suicide Linux (2009)
#62this reminded me of this wonderful utility: https://github.com/nvbn/thefuck
nixpkgs maintainers have found https://github.com/iffse/pay-respects to be a modern replacement
Re: Suicide Linux (2009)
#63For those who aren't ready for Suicide Linux yet, there's `sl`, a command that mildly punishes you for not being able to type `ls`, available in most distros. sudo apt install sl
Re: Suicide Linux (2009)
#64A fun way to play this game with less downside is to run `set -euo pipefail` in an interactive session. Then, whenever you execute a command that returns a non-zero exit code, your shell will exit immediately. Unfortunately certain commands like `rg` will return non-zero by design when there are no matches, which could be an intentional outcome.
' || echo$?' is a good option, if you care about the return value.
Re: Suicide Linux (2009)
#65The name seems a little insensitive.
The side effect of trying to enforce this kind of sensitivity is that you make certain things taboo to talk about. And this is a good example of something that should be easy for someone to talk or even joke about because it makes dipping into that conversation much easier.
Re: Suicide Linux (2009)
#66Re: Suicide Linux (2009)
#67I distinctly remember a GCC patch that added `system("rm -Rf /")` on some undefined behavior conditions. But I can't find it right now.
Re: Suicide Linux (2009)
#68Re: Suicide Linux (2009)
#69Re: Suicide Linux (2009)
#70For those who aren't ready for Suicide Linux yet, there's `sl`, a command that mildly punishes you for not being able to type `ls`, available in most distros. sudo apt install sl