-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
Added variables to make customizing the prompt easier. #277
Conversation
Added the following variables to $global:GitPromptSettings to make customizing the prompt easier. AddedText, default '+' ModifiedText, default '~' RemovedText, default '-' ConflictedText, default '!'
Thanks for this! Two suggestions:
|
Added "File" prefix to (now) FileAddedText, FileModifiedText, FileRemovedText, and FileConflictedText--before, LocalWorkingStatusSymbol and ConflictedText had the same content by default ("!"), as did LocalStagedStatusSymbol and ModifiedText ("~"). Changed prompt output of the above variables to use string expansion rather than concatenation. Also re-aligned several indentation blocks from 2-space to 4-space indents. In my opinion, tabs help avoid these issues, but I'll defer to the lead coder here. Several lines had nothing but spaces on them, so I removed the spaces (keeping the empty double line-break).
Added "File" prefix to (now) FileAddedText, FileModifiedText, FileRemovedText, and FileConflictedText--before, LocalWorkingStatusSymbol and ConflictedText had the same content by default ("!"), as did LocalStagedStatusSymbol and ModifiedText ("~"). Changed prompt output of the above variables to use string expansion rather than concatenation. Also re-aligned several indentation blocks from 2-space to 4-space indents. In my opinion, tabs help avoid these issues, but I'll defer to the lead coder here. Several lines had nothing but spaces on them, so I removed the spaces (keeping the empty double line-break).
Okay, fixed that stuff. Check out commit 2e06383. |
Looks great! Would you mind rebasing this branch on latest |
Okay, I believe I rebased it correctly, but check to make sure. |
It changed, but still weird:
You should be able to do something like this:
|
Looks somewhat cleaner, is this what you were going for? |
Weird...I would expect a linear history:
(And really, you can squash the second "Changed variables" commit into the first one.) I wonder if part of your branch has been merged into your local |
Actually, this is fine. Thanks for the contribution! |
Added the following variables to $global:GitPromptSettings to make customizing the prompt easier.
It may be noteworthy that LocalWorkingStatusSymbol and ConflictedText will have the same content by default (“!”), as will LocalStagedStatusSymbol and ModifiedText (“~”)—this could lead to confusion. However, I didn’t want to delete existing variables, so I left them alone for the time being.
I also realigned the indenting on the block of stash-related variables within GitPromptSettings.