My Beautiful Prompt | Using Prezto & ZSH19 Mar 2016
I first learned to take baby steps on the command line about two years ago as I had to diagnose problems with remote installations of the IIoT application my team was building. But it wasn’t until a few months back when I switched to Ubuntu as my primary operating system that I truly appreaciated the power and awesomeness that a command line puts at the tips of your fingers.
Since then, I’ve tried my best to use the keyboard whenever my fingers were twitching to reach the mouse/touchpad. As a product manager who strides the worlds of business, design and code, I was astounded how many programmers are just OK with the default prompts that they are presented with. These are functional no-doubt but ugly. Very Ugly.
Of course, I started out with the defaults but as I developed my own preferences on tools (started out with
zsh and finally migrated to oh-my-zsh), I experimented with various terminal themes and custom prompts.
I hadn’t found quite the fit until I switched from using oh-my-zsh (it was becoming more of a burden) to Prezto.
Two things I loved about this prompt: - The clean seperation between user@computer and directory path - The seperation of information on one line and commands on the other
I started of with the giddy prompt as my basis. A few modifications got me a prompt that I am finally satisfied with.
I didn’t quite like how the cyan in the theme was coming out for me. Went to the pallete editor from the top menu of the Gnome Terminal (Preferences > Base 16 Eighties Dark Profile > Color) and changed the pallete entry 7 to
I also modified the colors, font strengths and arrangement of username and directory filepath.
Added support for active Python virual environments
You can download and use it as your prompt.
- Download the file from my Github dotfiles repo
- Paste into your
- Modify your
.zpreztorcas shown below.
$ zstyle ':prezto:module:prompt' theme 'nphadke'
I’ll keep tinkering with this prompt but it seems good to go for now. This was the first post of a series that I’m planning on the tools and workflows that I’m favoring at the moment.