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

Create a basename option for the prompt's working_dir segment #21

Open
hbjydev opened this issue Jun 26, 2020 · 5 comments
Open

Create a basename option for the prompt's working_dir segment #21

hbjydev opened this issue Jun 26, 2020 · 5 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@hbjydev
Copy link

hbjydev commented Jun 26, 2020

Then instead of ~ > Workspace > git-repo we could just have git-repo.

Perhaps allow just having this when you're in a git repo? So it's relative to the repo root?

@hbjydev
Copy link
Author

hbjydev commented Jun 26, 2020

(with regards to the git repo one: git rev-parse --show-toplevel will get the absolute path to the root of the current repository)

@petobens
Copy link
Owner

At the moment you can set

TRUELINE_WORKING_DIR_ABBREVIATE_PARENT_DIRS=true
TRUELINE_WORKING_DIR_ABBREVIATE_PARENT_DIRS_LENGTH=1

to get ~ > W > git-repo. I think that having some indication of the full path (even as minimal as a single letter) is generally useful.

@hbjydev
Copy link
Author

hbjydev commented Jun 26, 2020

Yes, it is, but it would also be useful (for smaller terminals open alongside an editor on a laptop, for instance) to have a basename-based working_dir as well

@petobens
Copy link
Owner

Ok. I might consider adding it. Feel free to send a PR in the meantime.

@hbjydev
Copy link
Author

hbjydev commented Jun 26, 2020

If I get the chance, I will. My Bash skills aren't that good though, haha

@petobens petobens added enhancement New feature or request good first issue Good for newcomers labels Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants