Bash PS1 Generator
91–100 of 146 posts
Re: Bash PS1 Generator
#92Re: Bash PS1 Generator
#93current git branch is missing (helps me to avoid working on the wrong branch). (tried to do it with colors, but things got too messy). I never managed to work with colors in bash propmts; they look different on each environment. parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } PS1="[\u@\h \W\$(parse_git_branch)]\$ "
git branch --show-current
See https://git-scm.com/docs/git-branchRe: Bash PS1 Generator
#94Re: Bash PS1 Generator
#95Re: Bash PS1 Generator
#96Earlier quoted context omitted.
> 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 languag…
But no one is insisting.
--
https://en.wiktionary.org/wiki/insist#Verb
Wiktionary is a website that has improved functionality after turning on JavaScript, but works just fine without it. It does not insist on using JavaScript.
I guess what you actually mean is "no one is insisting on me looking at their website"? That would be true, but I don't recall making any contrary claims.
If I do want to look at a website, the site insists on using JavaScript, but does not use HTTPS, that can be a security issue. That's what my original comment tries to point out.
Re: Bash PS1 Generator
#97Use https://starship.rs/ abs get the same prompt in all your shells. Also it’s written in rust, so it’s faster than a load of bash scripts.
Re: Bash PS1 Generator
#98Use https://starship.rs/ abs get the same prompt in all your shells. Also it’s written in rust, so it’s faster than a load of bash scripts.
Absolutely a quality of life tool. Very few excuses left to put up with zsh + Oh-My-Zash.
Re: Bash PS1 Generator
#99current git branch is missing (helps me to avoid working on the wrong branch). (tried to do it with colors, but things got too messy). I never managed to work with colors in bash propmts; they look different on each environment. parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' } PS1="[\u@\h \W\$(parse_git_branch)]\$ "
export PS1="\n\$(kube_ps1)\n\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[0;31m\]\$(__git_ps1)\n\$\[\033[00m\] "
Note it needs the git-prompt.sh script (usually comes with the bash-completion package), and the kube-ps1 script: https://github.com/jonmosco/kube-ps1
It will show you the current kubernetes profile and namespace, user@host, current directory and git branch if you're in a git repo.
Re: Bash PS1 Generator
#100Was expecting this: ________________ | |," `.| | SgH | / SONY \ | |O _\ /> /_ | ___ _ |_(_)'.____.'(_)_| (")__(") [___|[=]__[=]|___] // \\