One option that is missing that I really thing is useful is<p><pre><code> wincolour=$yellow
errorcolour=$red
# To provide a coloured version of $?, wrapped in (). Used in PS1
pretty_exit_code(){
LAST_COMMAND_STATUS=$?
if [ $LAST_COMMAND_STATUS = 0 ];
then echo -e "$wincolour($LAST_COMMAND_STATUS)$black";
else echo -e "$errorcolour($LAST_COMMAND_STATUS)$black";
fi
}
</code></pre>
Which just provides the exit code of the last command, but coloured differently for failure or success.
Nice!<p>A bug report, space tokens should not exhaust. Currently you can at max have 2 spaces, the one that is in the config by default and one from the available tokens.
Hey everyone,<p>Thanks for checking out the bash profile generator! I'm a student at Flatiron School[1] NYC (where we have electricity in NYC, no small feat today) and this project came about when we were learning to setup our CLIs in the first week.<p>Please let me know if you have any comments/feedback on twitter: @rexfeng<p>[1] <a href="http://flatironschool.com/" rel="nofollow">http://flatironschool.com/</a>
Very nice. I sort of with there was an easy way to do fish style prompt paths in bash (/home/username/bin -> /h/u/bin), but that's hardly this excellent website's fault. I guess I'm just annoyed at being tied to bash due to ROS.
I love this idea - especially for those that are unfamiliar with BASH yet still want to customize their command line experience. Unfortunately due to a previous HN article I now use zsh - would love to see a zsh prompt generator too!