Skip to content

Instantly share code, notes, and snippets.

@nikolay-pshenichny
Created July 17, 2015 17:33
Show Gist options
  • Save nikolay-pshenichny/55daca7421354cde30bc to your computer and use it in GitHub Desktop.
Save nikolay-pshenichny/55daca7421354cde30bc to your computer and use it in GitHub Desktop.
Visual Studio powershell profile [Package Manager Console powershell profile]
#
# Powershell profile for the Package Manager Console (Visual Studio)
# How to setup - https://docs.nuget.org/consume/Setting-up-NuGet-PowerShell-Profile.md
#
# History:
# 7/17/2015:
# - Posh-Git - Expected to be in C:\Src\posh-git\
# - Aliases for GitExtensions;
# - Aliases for Git;
# - Aliases for a vs solution directories.
#
# Load posh-git example profile
. 'C:\Src\posh-git\profile.example.ps1'
# Git aliases
function Git-Pull { git pull $args }
Set-Alias -Name pull -Value Git-Pull -Description "Alias: pull == Git-Pull"
# GitExtensions aliases
function GitExtensions-Browse { gitex.cmd browse $args }
function GitExtensions-Commit { gitex.cmd commit $args }
Set-Alias -Name gebr -Value GitExtensions-Browse -Description "Alias: gebr == GitExtensions-Browse"
Set-Alias -Name gecom -Value GitExtensions-Commit -Description "Alias: getcom == GitExtensions-Commit"
# Directories
function Go-Solution { Split-Path -Parent $dte.Solution.FullName | cd }
Set-Alias -Name solution -Value Go-Solution -Description "Alias: solution == Go-Solution"
# Show all aliases that were added
Get-Alias | Where {$_.Description.StartsWith('Alias:')}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment