Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
There are plenty of solutions online but I can't wrap my head around on HOW to add it to the PS1 variable inside the bashrc. If anyone knows, please tell us all in the comments here!
-
For bash https://stackoverflow.com/questions... might help. I myself use oh-my-zsh on most machines which just add everything I already want. Hope this helps :)
-
Kimmax109876y@filthyranter PS1 is just an environment variable, you can just override / export it in bashrc. Only applies in a new instance of bash, (or after resourcing the bashrc)
-
@zlice do I put it in the .bash_profile and refresh my bash profile? It did not work
-
@iAmNaN Thanks! Been pondering a long time about a username, finally found a fitting username :)
-
You need to use the PROMPT_COMMAND to set the PS1 after every execution of a command
Btw, how do you have IP ranges >255?
Related Rants
When I do SSH to a remote server, how can I show git branch name?
When I SSH it shows me this:
admin@123.456.789.555:/home/some_folder$
Can I configure it to show something like oh-my-zsh that shows me the current Git branch I am pointed to?
This is my local iTerm zsh default theme:
some_folder git:(feature/some_branch_name)
question
show remote server branch name
git
terminal