Some tricks for interactive usage of Bash shell
mahesh-hegde.github.io·5d·
Discuss: Hacker News
Flag this post

While I am not a strict command line affectionado, I have found myself to spend significant time in the terminal, especially when doing devops-y work. Here are some things I learned which will improve the speed when working in terminal.

Note that many of the snippets here were found by me / edited long back. I may not be able to attribute the correct source of each snippet. Let me know if you know the original sources of any snippets posted herein.

Showing non-zero exit codes in red.

When a command has too little or too less output, it’s impossible to visually distinguish whether the command failed or passed. I find it useful to print the exit code in red if it’s non-zero. That way a failing command is visually distinct.

Here’s how to set it up in ~/.bashrc.

## Mak...

Similar Posts

Loading similar posts...