Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Truncate directories before git directory #141

Closed
anton-johansson opened this issue Jun 12, 2017 · 7 comments
Closed

Truncate directories before git directory #141

anton-johansson opened this issue Jun 12, 2017 · 7 comments
Labels
help-wanted We need help to resolve this issue or PR. proposal An issue (rarely PR) for feature-requests, ideas, etc

Comments

@anton-johansson
Copy link
Contributor

When in a Git-directory, it would be nice if I could configure so all parent directories were truncated. For example, I want this:
~/Projects/spaceship-zsh-theme on  fix-typo

... to become:
spaceship-zsh-theme on  fix-typo

@salmanulfarzy
Copy link
Member

Currently there is no option to truncate dir prompt only in git directories. But you could truncate the number of directories shown in prompt globally using SPACESHIP_DIR_TRUNC=1

@anton-johansson
Copy link
Contributor Author

Yeah, I saw that, but I would love to only truncate when in a repository :) Any plans on such a feature? I've seen a similar feature in other themes, should be pretty straight forward?

@salmanulfarzy
Copy link
Member

Yes, It could be implemented using the _is_git() helper method.

@anton-johansson
Copy link
Contributor Author

Allright, lets keep this open and I might take a look at sending a PR for it.

@denysdovhan
Copy link
Member

@anton-johansson nice feature. We're looking forward for PR.

P.S: Don't forget about hg repos too :)

@denysdovhan denysdovhan added proposal An issue (rarely PR) for feature-requests, ideas, etc help-wanted We need help to resolve this issue or PR. labels Jun 21, 2017
@denysdovhan
Copy link
Member

@anton-johansson I'm closing this PR since this feature is implemented in #148. Check out #168. It's implemented only for Git. Would be great to have a Mercurial implementation in future.

@anton-johansson
Copy link
Contributor Author

Awesome!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help-wanted We need help to resolve this issue or PR. proposal An issue (rarely PR) for feature-requests, ideas, etc
Development

No branches or pull requests

3 participants