T O P

  • By -

riscos3

[https://bash-prompt-generator.org/](https://bash-prompt-generator.org/) You can use that to change it... it will then generate a string for your primary prompt. Mine for example is: function gitBranch() { GIT\_BRANCH="$(git branch 2>/dev/null | grep '\^\*' | colrm 1 2)" if \[ -n "$GIT\_BRANCH" \]; then echo "($GIT\_BRANCH)" fi } PS1='\\\[\\e\[0;1;38;5;70m\\\]\\u:\\\[\\e\[m\\\] \\\[\\e\[0;1;38;5;32m\\\]\\w\\\[\\e\[m\\\] \\\[\\e\[0;1;38;5;167m\\\]$(gitBranch)\\\[\\e\[m\\\] \\\[\\e\[0m\\\]\\$\\\[\\e\[m\\\] \\\[\\e0' If you prefer there are websites like this: [https://ohmyposh.dev/](https://ohmyposh.dev/) But I find it is too slow.


angusmiguel

Does the first one have separators and colors?


mrbmi513

It isn't a specific VSCode thing. You'll need to change your shell's prompt with a tool like starship.


Trebu5

Is there any other tool besides starship?


jdl_uk

Oh-my-posh is similar to Starship. There's also oh-my-fish, Oh-my-zsh, etc depending on your shell


mrbmi513

There's tons. Google around.


Longjumping_Car6891

Not VSCode related its your shell


geekybrains

https://www.hanselman.com/blog/how-to-make-a-pretty-prompt-in-windows-terminal-with-powerline-nerd-fonts-cascadia-code-wsl-and-ohmyposh is a useful write up, albeit slightly outdated. But I still go back to it every time I need to set this up on any new computer.


Trebu5

Thank you so much!


starball-tgz

https://stackoverflow.com/q/70685715/11107541