Posh-git for Powershell

I don’t know how I discovered this, but it is all but indispensable now… A PowerShell environment for Git http://dahlbyk.github.io/posh-git/ When you are in a local git repo, posh-git shows you basic output of the “git status” command.  For example: C:\users\hxchba\dropbox\posh-git [cbMods +1 ~2 -0 !]> Displayed are the branch name, count of untracked files, …

Continue reading ‘Posh-git for Powershell’ »

Sharing configuration files

Update: Git has a very useful ‘include’ facility to make sharing common configuration a pretty simple process. In your ~\.gitconfig: [include] path = “c:/users/charles/dropbox/git/commonConfig” Place this line early in .gitconfig; any settings in the common config file that need to be overridden on a particular computer can be included later in the local .gitconfig. Be …

Continue reading ‘Sharing configuration files’ »

PowerShell script to install Custom Gallery for Doc. AutoSave

I got a note regarding the Visual Studio AutoSave extension saying they wished installing it were simpler.  I suspect they were referring to having to set up the custom gallery, rather than being able to get it from the Microsoft gallery. I’m not ready to put it in the Microsoft gallery yet, so I toggled …

Continue reading ‘PowerShell script to install Custom Gallery for Doc. AutoSave’ »

Powershell Get-History and Invoke-History

I use Get-History (‘ghy’) and Invoke-History (‘ihy’) frequently, so I started thinking about streamlining their use. I came up with Run-CmdFromHistory: function Run-CmdFromHistory {      param (         [Parameter(Mandatory=$false)]         [Int32] $cmdCnt = 15     )     $cmds=get-history | select -last $cmdCnt;     $cmds;     Write-Host “Enter a cmd id to run (empty to cancel)” …

Continue reading ‘Powershell Get-History and Invoke-History’ »

Vim, Ctags, and PowerShell

Since I have been working with some PowerShell modules that consist of several .ps1 files (in addition to the .psm1 file), I was curious as to whether ctags could work with PowerShell. This post was a pretty good start.  There were two problems, easily fixed. The first was in the command line to add PowerShell …

Continue reading ‘Vim, Ctags, and PowerShell’ »

Get Git status in PowerShell

A script that queries every subdirectory of the current directory, checking for untracked or modified files, as well as updates in a remote source. For example, running it in the bundles dir (home to a number of Vim addins): > . gitStat.ps1 ————————————— Checking for local changes ————————————— AutoComplPop     No modified files iceberg.vim …

Continue reading ‘Get Git status in PowerShell’ »

Build VisStudio projects from PowerShell Console

I like being able to build projects and solutions from the command line.  That is easy enough to do from a “Developer Command Prompt”, as that sets up all the necessary environment variables (via vsvars32.bat). However, I have long preferred TakeCommand/TCC to cmd.exe, so I created a .bat file for TakeCommand that called vsvars32 (if …

Continue reading ‘Build VisStudio projects from PowerShell Console’ »

PowerShell in VS2013

The Package Manager Console is an instance of PowerShell in a tool window. You can get your full PowerShell environment by  manually running your startup script: > cd $env:Home\Documents\WindowsPowerShell  # you may need to use $env:USERPROFILE > . Microsoft.PowerShell_profile.ps1 (Of course, use the name of your startup script…) I use posh-git with PowrShell, and now …

Continue reading ‘PowerShell in VS2013’ »