Solvedagnoster zsh theme I would like to have the command line in next line how do I do that?
✔️Accepted Answer
Hi, u can edit agnoster.zsh-theme
- search
prompt_end()
- modify
print -n "%{%f%}"
asprint -n "\n%{%f%}"
(just add\n
) - save it and re-open ur terminal
Other Answers:
Maybe u can find it in this path: ~/.oh-my-zsh/custom/themes/
or ~/.oh-my-zsh/themes
I'm not really sure.
If you are not seeing any change maybe you are using the 'robyrussell' theme (it was my default). You can check that at the beginning of .zshrc:
If that is your case substitute this line in the file ~/oh-my-zsh/themes/robbyrussell.zsh-theme :
PROMPT+=' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
for this one.
PROMPT+=$' %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)\n'
We sometimes get tired of configuring many times all the linux set up, for that reason you can move the config fimes .vimrc .zshrc ... to a repo, commit them often and make the system reach them at that place by creating hard links.
Hi, u can edit
agnoster.zsh-theme
- search
prompt_end()
- modify
print -n "%{%f%}"
asprint -n "\n%{%f%}"
(just add\n
)- save it and re-open ur terminal
Thanks buddy.
in case you don't see print again in agnoster, they have change to echo, so you will modify like this
echo -n "\n%{%f%}"
I've carried this out and additionally added a little prompt because it felt better
echo -n "\n>%{%f%}"
so it places a>
character on the newline before the cursor. However that character inherits the colour of whatever the main prompt line ends with (e.g. blue for directories, green or yellow for git). Is there a way I can force it to always be white?
Hi @M1ke, you can use this: echo -n "\e[m\n>%{%f%}"
which added \e[m
before \n
I love the color scheme, but sometimes my git branch name kind of too long, it make me hard to read what I type.
How do I make like below
shiro@Mac ~/Sites/myproject/test/project1 branch-new-feature ●