Created
January 5, 2026 13:23
-
-
Save RellikJaeger/ec356a4afd57d7df4ddf81393c7ee4bb to your computer and use it in GitHub Desktop.
Custom stderr-silent prefix function. Copy and paste this code into `~/.bashrc` or `~/.zshrc`, then run `source ~/.bashrc` or `source ~/.zshrc`.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Custom stderr-silent prefix function | |
| # Example: `_ find / -name pkgx` | |
| # This will silence stderr in the output | |
| _() { | |
| # if first arg is "_", shift it | |
| if [[ "$1" == "_" ]]; then | |
| shift | |
| fi | |
| "$@" 2>/dev/null | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment