Add New Line To Oh My ZSH Theme

I am trying to add a new line to my existing Oh My ZSH theme, but I cannot figure out what to add or where to add / change it. Any ideas?

+5
source share
1 answer

I really searched for the same answer. But my needs were a little more specific since I just wanted to add a new line to the agnoster theme that I am currently using.

In this study, I find many branched topics that already do this, but I thought this overflow solution was just for adding a new line.

So, I read the agnoster code and came up with a solution to overwrite the prompt_end() function in my .zshrc file.

To do the same in the agnoster tag, simply add the following code to 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 ➜"; } 

We hope this helps you understand how to customize your theme.

+9
source

Source: https://habr.com/ru/post/1260929/


All Articles