Skip to content

Conversation

maoueh
Copy link

@maoueh maoueh commented Dec 22, 2018

Added a new option BULLETTRAIN_DIR_SHORTEN_GIT_REPO available through prompt_dir that
will displays a shorten prompt dir if the current working directory is within a git repository.

For a prompt_dir of /Users/john/work/project/a where a has a .git folder, the prompt dir when using BULLETTRAIN_DIR_SHORTEN_GIT_REPO would be simply a. For a prompt_dir of /Users/john/work/project/b/nested/deep where b has a .git folder, the prompt dir when using BULLETTRAIN_DIR_SHORTEN_GIT_REPO would be b/nested/deep.

If there is no .git directory within the working directory or its parent, then prompt_dir behaves as before.

Added a new option `BULLETTRAIN_DIR_SHORTEN_GIT_REPO` available through
`prompt_dir` that will displays a shorten prompt dir if the current
working directory is within a git repository.

For a `prompt_dir` of `/Users/john/work/project/a` where `a` has a
`.git` folder, the prompt dir when using
`BULLETTRAIN_DIR_SHORTEN_GIT_REPO` would be simply `a`. For a
`prompt_dir` of `/Users/john/work/project/b/nested/deep` where `b` has a
`.git` folder, the prompt dir when using
`BULLETTRAIN_DIR_SHORTEN_GIT_REPO` would be `b/nested/deep`.

If there is no `.git` directory within the working directory or
its parent, then `prompt_dir` behaves as before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant