Live data from Hacker News

Bash PS1 Generator

bashrcgenerator.com

21–30 of 146 posts

Re: Bash PS1 Generator

#22
post #20
post #8

Earlier quoted context omitted.

It's too bloated. It has all kinds of built-in stuff with ugly defaults instead of just providing a framework with plugins.

It can be configured and the default has to be something. The main problem is that it’s just too slow, at least in my experience. Even stripped of some bloat it can take >1s to get the prompt printed. Not worth it, at all.

This has not been my experience at all.

Then again, I only use 5 of all the plugins available.

Re: Bash PS1 Generator

#24
post #2

No https.

While https is a good default, and LetsEncrypt has made it relatively trivial, I wouldn't say this particularly needs it; there isn't any user data at all. I suppose without TLS it could be intercepted and modified to return a malicious bash command, or something, but this random site on the internet could do that on its own without being intercepted anyway.

> I wouldn't say this particularly needs it; there isn't any user data at all.

I use NoScript. This page requires me to enable JavaScript for it to work. Because it doesn't use TLS, this allows any miscreant in the middle to injected JS doing god-knows-what into my browser.

If you really insist (in this case IMO understandable) on having me download and run your program, written in a turing complete scripting language, please let me do so in a way where I can be sure it is actually your program (assuming I trust you that far; which for most people I don't, hence NoScript).

Re: Bash PS1 Generator

#25
post #2

No https.

While https is a good default, and LetsEncrypt has made it relatively trivial, I wouldn't say this particularly needs it; there isn't any user data at all. I suppose without TLS it could be intercepted and modified to return a malicious bash command, or something, but this random site on the internet could do that on its own without being intercepted anyway.

> I suppose without TLS it could be intercepted and modified to return a malicious bash command, or something, but this random site on the internet could do that on its own without being intercepted anyway.

Those are two completely different attack surfaces. You should be able to trust a single site without having to trust every other hop on the Internet and a good reason why TLS should be used here.

Re: Bash PS1 Generator

#26
post #14

Notes: * 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)

See also:

* LiquidPrompt [0] (I'm a former maintainer)

* angel-PS1 [1]: my pet project. Shell prompt code is generated at startup time from Perl code, and uses a Perl angel (not daemon) to get system information.

[0] https://github.com/nojhan/liquidprompt

[1] https://github.com/dolmen/angel-PS1

Re: Bash PS1 Generator

#28
post #11

Earlier quoted context omitted.

Always having https removes the need to consider the security implications of unencrypted transport on case-by-case basis. I have been using HTTPS Everywhere extension and currently Firefox's HTTPS-Only feature in strict mode for a long time. Nowadays few links fail to work for me, so the failing ones stand out.

Me too. Out of curiosity, I also added a user style sheet (via Stylus) to mark HTTP links: :where(:link[href^="http:"])::after { content: " [http]"; color: red; text-decoration: none; } (I use the :where(…) wrapping so that any site actually trying to use :link::after for real stuff can override my styles without specificity conflicts.) It’s interesting especially to see how often https: sites have http: links to the…

Great trick.

Re: Bash PS1 Generator

#30
post #2

No https.

While https is a good default, and LetsEncrypt has made it relatively trivial, I wouldn't say this particularly needs it; there isn't any user data at all. I suppose without TLS it could be intercepted and modified to return a malicious bash command, or something, but this random site on the internet could do that on its own without being intercepted anyway.

This is a website which serves the sole purpose of encouraging people to copy snippets of text and paste them into their terminal, and there are plenty of techniques that ensure what you see on the page isn't what gets into your clipboard.
Post reply on HN