Skip to content

Instantly share code, notes, and snippets.

@PyYoshi
Created August 8, 2012 06:27
Show Gist options
  • Select an option

  • Save PyYoshi/3292820 to your computer and use it in GitHub Desktop.

Select an option

Save PyYoshi/3292820 to your computer and use it in GitHub Desktop.
# virtualenvwrapper用の設定
$WORKON_HOME = "$HOME\.virtualenvs"
$env:WORKON_HOME = $WORKON_HOME
# $WORKON_HOMEがない場合は作成する
if(-not(Test-Path -Path $WORKON_HOME)){
New-Item -Path $WORKON_HOME -itemType Directory | Out-Null
}
# PowerTabのロード
$powertab_module_path = "$profile\..\Modules\PowerTab\PowerTab"
Import-Module $powertab_module_path
# virtualenvwrapper-powershellをロード
$virtualenv_module_path = "$profile\..\Modules\VirtualEnvWrapper\VirtualEnvWrapper"
Import-Module $virtualenv_module_path
--- D:/My Document/WindowsPowerShell/Modules/PowerTab/PowerTab.psm1.orig Thu Oct 21 20:03:08 2010
+++ D:/My Document/WindowsPowerShell/Modules/PowerTab/PowerTab.psm1 Wed Aug 08 15:30:42 2012
@@ -13,8 +13,12 @@
#########################
## Cleanup
#########################
+if($host.Version.Major -eq 3){
+ $OldTabExpansion = Get-Content Function:TabExpansion2
+}else{
+ $OldTabExpansion = Get-Content Function:TabExpansion
+}
-$OldTabExpansion = Get-Content Function:TabExpansion
$Module = $MyInvocation.MyCommand.ScriptBlock.Module
$Module.OnRemove = {
Set-Content Function:\TabExpansion -Value $OldTabExpansion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment