DEV Community

Discussion on: Customizing my Zsh Prompt

Collapse
 
nikfp profile image
Nik F P

This is a really nice trick! In trying to figure this out I ended up giving up and going with a prompt styler - the script syntax was too dense for me at the time.

If you are interested, you should check out Oh-my-posh, it's been awesome to use. Here's a pic of the prompt I've been using:

A prompt picture

This is my custom prompt that has the current username, which shell I'm using, current directory, Node version in use, and the end with the heart is the exit code status of the last command. (turns red if the exit code is non-zero) The second line is git status and only appears if I'm in a repo.

Setting these up can be tricky though, and the nice thing about what you built is it's easier to sync between machines since it's just a script. Nothing needs to be installed. I think I'll try to do something similar to what you have for shell I use on a few places and see if it comes easier to me this time.

Collapse
 
narenandu profile image
Narendra Kumar Vadapalli

I use this one and its pretty great out of the box

Collapse
 
nssimeonov profile image
Templar++

It's really awesome. I love this. Except I use a theme based on the paradox theme, but I added a few more sections. Being a front-end dev lately and using different node versions for different projects it's a must to see the current npm version as well... especially if direnv somehow messes up loading the the right version for some reason every now and then)