4 ms·
What's allowing the terminal to display the current git branch on the input line? What's allowing the pretty path view instead of my ugly ascii "~/blah1/blah2
by CupOfJava 9y ago
What's allowing the terminal to display the current git branch on the input line?
What's allowing the pretty path view instead of my ugly ascii "~/blah1/blah2$ ?
- Hydraulix989 9y agoThe shell, likely zsh with a special prompt config
- egwynn 9y agoMost shells let you do some arbitrary work before/during the display of the prompt line (in Bash, you can use `PS1` and `PROMPT_COMMAND`). Some people then install special fonts that let them render these fancy “bar segment” things. [Powerline](https://github.com/powerline/powerline https://github.com/powerline/powerline) is a notable package for this, but there’s a lot of simpler alternatives out there nowadays.
- jhasse 9y agoPowerline: https://fedoramagazine.org/add-power-terminal-powerline/ https://fedoramagazine.org/add-power-terminal-powerline/
- purerandomness 9y agoI used https://github.com/magicmonty/bash-git-prompt https://github.com/magicmonty/bash-git-prompt for a long time - it's a bunch of bash scripts that show git info for directories that are git repositories. I've since switched to the fish shell (https://fishshell.com/ https://fishshell.com/) which has this built in. It doesn't matter which shell you use, all the common ones have some kind of plugins or extensions for that.