this post was submitted on 22 Mar 2025
74 points (93.0% liked)
Linux
52309 readers
1055 users here now
From Wikipedia, the free encyclopedia
Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).
Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.
Rules
- Posts must be relevant to operating systems running the Linux kernel. GNU/Linux or otherwise.
- No misinformation
- No NSFW content
- No hate speech, bigotry, etc
Related Communities
Community icon by Alpár-Etele Méder, licensed under CC BY 3.0
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Mine shows the user and host, git commit and branch, docker context and directory, color coded based on status of git:
[root@server001|G:19e526e@(master)|D:myContext|currentDir] $
Are you dowloading and sourcing a file from the internet on your prompt? That sounds a bit scary!
Well, yeah, but it's git: https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh
My thinking is that I trust git on my computer, so I trust downloading from their repo.
But you're right. I should revisit this and see if it's even necessary.
Is this running in your rc (i.e. every single time you open a terminal)? Even if it's safe, I'd be annoyed by any delay.
Yeah, its checking if the file exists first, so it's not doing it all the time.
My worry is more related to repos takeovers or hacks. This is pretty hidden, so it could be easy to even forget it's there, probably not the worst, but still..
It is in my .bashrc, but any delay is not noticeable.
Ah that's fair, I didn't look closely