Bash PS1 Generator
41–50 of 146 posts
Re: Bash PS1 Generator
#42I think the drag-n-drop UI is less intuitive. Wasted a few minutes trying to click these items as "buttons" and wondering if there's something wrong because of the http-onlyness of the site (console gives a lot of warning).
Yea, why not just have "double-click" as "add this element to the end of input".
Exit status should defo be in the default in all distros.
Re: Bash PS1 Generator
#43Notes: * As an idea, this is excellent. It's intuitive to use and provides full instructions on how to implement * Putting an element in any other position than the end of the prompt is fiddly. * I'd love for the option to to be able to colour elements. * More advanced or exotic element types such as Git Branch would be excellent (Not sure if Bash supports this, but I've seen it in some shells)
For the manual approach, git provides a shell script to generate the env var __git_ps1 for this very purpose.[1] [1]: https://git-scm.com/book/id/v2/Appendix-A%3A-Git-in-Other-En...
Re: Bash PS1 Generator
#44Normally I don't post much about how a site should use HTTPS on HN, but for this specific instance I think it's important.
why?
Re: Bash PS1 Generator
#45Make your trace output more useful/verbose in your scripts:
set -x
export PS4='+ ${BASH_SOURCE:-}:${FUNCNAME[0]:-}:L${LINENO:-}: '
This will print the filename, function name, line number, and line content during execution.Re: Bash PS1 Generator
#46Re: Bash PS1 Generator
#47Re: Bash PS1 Generator
#48 ________________
| |," `.| | SgH
| / SONY \ |
|O _\ /> /_ | ___ _
|_(_)'.____.'(_)_| (")__(")
[___|[=]__[=]|___] // \\Re: Bash PS1 Generator
#49I think the drag-n-drop UI is less intuitive. Wasted a few minutes trying to click these items as "buttons" and wondering if there's something wrong because of the http-onlyness of the site (console gives a lot of warning).
Re: Bash PS1 Generator
#50Am I the only one who leaves mine as is?