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

Add remote name enum #914

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

marckassay
Copy link

This PR resolves feature request #781 more so than PR #908.

This PR utilizes PowerShell's enum flags for positioning the remote name relative to the branch name. I'm not sure if that is a concern since I'm pretty sure that is a somewhat newer feature for PowerShell. In addition to placement, the user can specify any value in between the remote and branch name.

If this PR is merged, it will require an additional image similar to the one in PR #908. Otherwise, a broken image link will occur in README.md. I can provide that image here in the next couple of hours or so if needed.

- This commit has no impact on typical usage. A subsequent commit will implement it in its prompt building algorithm
- Add show-remote-name feature
@marckassay marckassay mentioned this pull request Jul 14, 2022
@marckassay
Copy link
Author

marckassay commented Jul 14, 2022

I just updated images for README.md as best as I can at the moment. See them below.

PromptShowRemoteName.png:
PromptShowRemoteName
PromptShowRemoteNameEnd.png
PromptShowRemoteNameEnd

If your profile is importing posh-git from your local repo and need to add a remote repo, I suppose you can add my repo to test:

git remote add marckassay https://github.com/marckassay/posh-git.git
git fetch marckassay
git checkout add-remote-name-enum

... and then start a new PS session. See the README to set this feature.

Also, feel free to make edits. Change names of properties for settings, function name, et cetera if desired. Fyi, the Placement enum labels are following CSS nomenclature which may not mentally map in the context of a PS module. So consider that too.

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.

None yet

1 participant