Live data from Hacker News

Bash PS1 Generator

bashrcgenerator.com

11–20 of 146 posts

Re: Bash PS1 Generator

#11
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.

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.

Re: Bash PS1 Generator

#13
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 suppose without TLS it could be intercepted and modified to return a malicious bash command, or something

A hacked version doesn't have to return a variation of what's on the page already. There's lots of sneaky things you could return, like a malware download pretending to be a Bash PS1 setup script, a fake GitHub based sign-up to harvest login details, a payment form for a fake product, or a simple redirect to another malicious site.

Re: Bash PS1 Generator

#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)

Re: Bash PS1 Generator

#16
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)

double click an element to change the color

Re: Bash PS1 Generator

#17

Earlier quoted context omitted.

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 suppose without TLS it could be intercepted and modified to return a malicious bash command, or something A hacked version doesn't have to return a variation of what's on the page already. There's lots of sneaky things you could return, like a malware download pretending to be a Bash PS1 setup script, a fake GitHub based sign-up to har…

[deleted]

Re: Bash PS1 Generator

#18
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)

Bash do support git branch name and whatnot. That what got me into PS1 customization.

Re: Bash PS1 Generator

#19
post #11

Earlier quoted context omitted.

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.

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 their own domain, which are just going to get redirected back to the https:. (The HN footer has the “Legal” and “Apply to YC” links being to http://www.ycombinator.com/* for no good reason, a very similar case.)

And how horribly many emails use http: tracking links, and how painfully many of those domains don’t speak HTTPS.

HN’s front page normally has 0–2 out of 30 of the links being HTTP, almost always old domains. It’s fairly rare for a new site to go plain HTTP.

Re: Bash PS1 Generator

#20
post #8
post #3

Or use starship...

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.
Post reply on HN