Skip to content

Conversation

@xvilo
Copy link

@xvilo xvilo commented Apr 6, 2018

This will add fish-style directory paths when one has shrink_path installed.

Closes #52

@gdlm91
Copy link

gdlm91 commented Mar 13, 2019

Dumb question: how do you use shrink_path command in the Theme? I tried copying your theme as a custom theme (removing the IF to force shrink to execute), but I keep getting command not found shrink_path when opening my terminal.

@aemonge
Copy link

aemonge commented Mar 15, 2019

I was a bit confused about this merge request...... since It's been long that I don't really remember.

But to answer your question directly, I've made my own ( hard-coded ) agnoster-theme that sets the path to be fish like. IE instead of ~/usr/projects/personal/super-proyect it will show you ~/u/p/p/super-proyect trimming the initial part.

The code that does that is the following:

  local trim_path=$(print -P ' %~ ' | sed -E -e "s#([^a-z]*[a-z])[^/]*/#\1/#g")
  prompt_segment blue black $trim_path

You can use my forked version here: https://github.com/aemonge/agnoster-zsh-theme

Or if @gdlm91 is able (cause I can't) to merge it to utilize the shrink_path would be Awesome !

@xvilo
Copy link
Author

xvilo commented Dec 22, 2019

can we still merge this maybe?

@aemonge
Copy link

aemonge commented Dec 23, 2019

It would be my pleasure;) Any thoughts on this @agnoster ?

@apjanke
Copy link
Collaborator

apjanke commented Jan 3, 2020

Does this PR supersede #52? If so, you should put "Closes #52" in the PR summary, so the other PR will be auto-closed if this one gets merged.

@xvilo
Copy link
Author

xvilo commented Jan 3, 2020

@apjanke done

@apjanke
Copy link
Collaborator

apjanke commented Jan 3, 2020

Thanks!

@xvilo
Copy link
Author

xvilo commented Jan 3, 2020

@aemonge / @agnoster any update?

@aemonge
Copy link

aemonge commented Jan 3, 2020

Not from my part. But this I can spend some time during January to work on enabling such feature with a configuration variable :)

@apjanke
Copy link
Collaborator

apjanke commented Jan 3, 2020

If y'all are interested, I added this to my AgnosterJ fork.

apjanke/agnosterj-zsh-theme@e91e594

Screen Shot 2020-01-03 at 4 25 00 PM

@aemonge
Copy link

aemonge commented Feb 17, 2020

I've made a push to enable the trim path by export AGNOSTER_THEME_TRIM=1; in your ~/.zshr file.

@apjanke what does your pull-request do? Did you implement this by a use of a plugin ?

@apjanke
Copy link
Collaborator

apjanke commented Jun 21, 2020

what does your pull-request do? Did you implement this by a use of a plugin ?

My thingy is a fork of Agnoster, not a Zsh plugin. In my version, no plugin is needed; it just makes use of zsh's native prompt support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants