agnoster / agnoster-zsh-theme

A ZSH theme designed to disclose information contextually, with a powerline aesthetic
3.95k stars 583 forks source link

How to customize the prompt in oh-my-zsh? #128

Closed SturmB closed 4 years ago

SturmB commented 4 years ago

I am still new to zsh, oh-my-zsh, and agnoster, as well as only an amateur with linux in general, so please bear with me.

I am loving the combination of the above, but have just one tiny issue with agnoster, summed up in the image below:

mintty_D8ZkJAvkF1

Is there any way to shorten the prompt to only show the current directory and not the entire absolute path to it? It makes the prompt far too huge for some of my work, as you can see.

Now, I am aware that you have a Customize Your Prompt View section in the README, but I'm still too new to understand how to use it to achieve the result I stated above. Also, I don't think it's geared for oh-my-zsh users, because when I run the first command listed in that section, echo "${(F)AGNOSTER_PROMPT_SEGMENTS[@]}" | cat -n, I get only a "1" with nothing next to it as a result.

What steps should I take to customize the agnoster prompt with oh-my-zsh?

apjanke commented 4 years ago

If you're using Agnoster under Oh My Zsh, you're actually running their fork of the Agnoster theme, and not the code from this repo. Please ask this over on the Oh My Zsh repo; they may be able to help you.

This version of Agnoster does not currently support this. But there are some open PRs to add it in:

SturmB commented 4 years ago

Although it probably isn't helpful to anyone else experiencing this issue, I've decided to try moving to Powerlevel10k. I'm quite pleased with it so far.

hi20160616 commented 3 years ago

Although it probably isn't helpful to anyone else experiencing this issue, I've decided to try moving to Powerlevel10k. I'm quite pleased with it so far.

Awesome project! easy and beautiful!