Skip to content

Add remote name enum#914

Open
marckassay wants to merge 5 commits intodahlbyk:masterfrom
marckassay:add-remote-name-enum
Open

Add remote name enum#914
marckassay wants to merge 5 commits intodahlbyk:masterfrom
marckassay:add-remote-name-enum

Conversation

@marckassay
Copy link
Copy Markdown

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
Copy Markdown
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.

1 participant