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

Adds aliasing support for TortoiseGit commands #394

Merged
merged 3 commits into from
Feb 3, 2017

Conversation

eamodio
Copy link
Contributor

@eamodio eamodio commented Feb 2, 2017

Also allows configuration of TortoiseGit commands

Also allows configuration of TortoiseGit commands
Copy link
Owner

@dahlbyk dahlbyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just cosmetic fixes. Thanks for the contribution!

@@ -194,7 +194,7 @@ function GitTabExpansionInternal($lastBlock) {
# Handles tgit <command> (tortoisegit)
if ($lastBlock -match "^$(Get-AliasPattern tgit) (?<cmd>\S*)$") {
# Need return statement to prevent fall-through.
return $tortoiseGitCommands | Where-Object { $_ -like "$($matches['cmd'])*" }
return $Global:TortoiseGitSettings.TortoiseGitCommands.Keys.GetEnumerator() | sort | Where-Object { $_ -like "$($matches['cmd'])*" }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/sort/Sort-Object/

(also in TortoiseGit.ps1)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. PowerShell Core running on Linux or macOS does not have the sort alias defined for Sort-Object. So calling sort would execute the native sort utility.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

"subupdate" = "subupdate";
"switch" = "switch";
"checkout" = "switch";
"sync" = "sync";
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to alias fetch to sync?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

"sync",
"repostatus"
) | sort
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

EOL @ EOF, please!

(Tip: we have a .editorconfig that will enforce this for supported editors.)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed :)

@dahlbyk dahlbyk added this to the v0.7 milestone Feb 2, 2017
Changes % -> ForEach-Object
Adds fetch alias for sync
@dahlbyk dahlbyk merged commit 6e129ef into dahlbyk:master Feb 3, 2017
@dahlbyk
Copy link
Owner

dahlbyk commented Feb 3, 2017

💯 👏 🎉

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.

3 participants