Live data from Hacker News

Show HN: Interactive Bash Utilities

news.ycombinator.com

1–4 of 4 posts

Show HN: Interactive Bash Utilities

#1
Hello HN,

After some quick hacking, I have managed to extract some of the things in my .bashrc I find useful to make a library.

Maybe the most interesting part is prompt.sh. It displays the return code of the last command along with an error message. The error message comes from a look-up table using the last command run and the return code.

Please let me know what you want to see in such an utility library.

https://github.com/ertug/bash-utils

Re: Show HN: Interactive Bash Utilities

#3
You can turn all that elifs on prompt.sh into a case/esac.

I've returned to screen from tmux, since it manages vertical split. I've something similar for auto-screen. But my configuration avoids nested screen sessions (i.e. ssh to host A, and then from host A to host B, both with the same .bashrc configs), like this:

[[ -x $( type -P screen ) ]] && \ [[ -n "$SSH_CONNECTION" ]] && \ [[ "x$TERM" != 'xscreen' ]] && screen -dR

Re: Show HN: Interactive Bash Utilities

#4

You can turn all that elifs on prompt.sh into a case/esac. I've returned to screen from tmux, since it manages vertical split. I've something similar for auto-screen. But my configuration avoids nested screen sessions (i.e. ssh to host A, and then from host A to host B, both with the same .bashrc configs), like this: [[ -x $( type -P screen ) ]] && \ [[ -n "$SSH_CONNECTION" ]] && \ [[ "x$TERM" != 'xscreen' ]] && scre…

err... formating issue, delete the '\' chars for a single line.