To developers, the command line is a natural environment for daily work. It makes sense then to customize it to be as helpful as possible.
Try ope...
For further actions, you may consider blocking this person and/or reporting abuse
Fun-but-slightly-fragile fact: if you are SSH-ing to servers that don't reset the prompt, you can send your own by setting up
ssh
to send over yourPS1
variable (the variable that contains the prompt specification for bash), and setting up thesshd
to accept it.In your
/etc/ssh/sshd_config
:And then:
Or add it to your
~/.ssh/config
file:(If you customise the other types of prompt as well, those are PS2, 3, and 4, and you can send those as well: just separate with whitespace. And check
man ssh_config
for more info.)I was not aware of this feature. Quite cool, although it smells of remote code execution and therefore maybe not many SSH targets have this enabled by default?
Well, at that point you're already doing remote code execution manually by logging in. But, yes, the default is to not accept any environment variables, so it would only work if you already have the ability to alter the SSH daemon configuration. If you have that, you already have sufficient permissions to do almost anything to the machine anyway.
I guess a use case would be if you were deploying an OS image and didn't want to bake your prompt into it, but still wanted it available.
This is really really good and would like to apply this to my terminal in Linux. However I have little to no experience in customizing my terminal. I always stick to bash because I'm a little bit scared to touch it if anything goes wrong lol..
Hope you can give some tips for the downright beginners =) this looks too good. =)
Then you're delighted to know that Starship is basically zero-configuration prompt. Install it and it's usable from the get go. Of course, you can customize it with the TOML file mentioned.
I think installation instructions here are pretty good. If you have Mac, you can just use Homebrew to fetch it. Hit me with a DM, if you get stuck.
Very nice. I assume this will work in WSL too?
Correct. This only affects the shell so you can choose the platform to your liking.