agkozak / agkozak-zsh-prompt

A fast, asynchronous Zsh prompt with color ASCII indicators of Git, exit, SSH, virtual environment, and vi mode status. Framework-agnostic and customizable.
MIT License
290 stars 26 forks source link

Ability to disable directory trim. #13

Closed moonrumble closed 5 years ago

moonrumble commented 5 years ago

Currently, there is no way to disable directory trimming. I can set an arbitrary high number. How can i just disable that functionality?

May be settting AGKOZAK_PROMPT_DIRTRIM=0 or negative number should disable it?

agkozak commented 5 years ago

That's a smart idea. I'll work on it. Thanks.

agkozak commented 5 years ago

I put together something on the develop branch like what you described. See if you like it.

agkozak commented 5 years ago

I just pushed another commit (bug fix).

moonrumble commented 5 years ago

for some reason, It is still not working. I just tested with commit eaf7498

agkozak commented 5 years ago

It should be working -- yes, that is the latest commit. For me, it changes behavior as soon as I type

AGKOZAK_PROMPT_DIRTRIM=0

Just as a test, go to a directory with a fairly long name (such as /usr/local/share/zshelldoc) and type the following

_agkozak_prompt_dirtrim 0
_agkozak_prompt_dirtrim 1
_agkozak_prompt_dirtrim 2

and see what the responses are. (You might also want to type

zsh

first just to make sure you've got the latest version of the prompt loaded correctly).

moonrumble commented 5 years ago

It is working now as expected.