Posts

Showing posts with the label Oh My Zsh

Add Newline To Oh My ZSH Theme

Image
Answer : I was actually searching for the same answer. But my needs was a little more specific since I only wanted to add a newline in the agnoster theme, the one I'm using now. In my research, I find a lot of forked themes that already do it, but I thought that this was an overkill solution for only add a new line. So I read the agnoster code and come up with this simple solution of overwrite the prompt_end() function in my .zshrc file. To do it, just add the code bellow in your .zshrc file: prompt_end() { if [[ -n $CURRENT_BG ]]; then print -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR" else print -n "%{%k%}" fi print -n "%{%f%}" CURRENT_BG='' #Adds the new line and ➜ as the start character. printf "\n ➜"; } Hope it helps you to have a clue on how to customize your chosen theme. Here is the result: I think the proper place to change one's prompt is in the theme itself. On my syst...