Skip to content

Instantly share code, notes, and snippets.

@m-hiyama
Created October 14, 2015 02:23
Show Gist options
  • Save m-hiyama/74f3a6f57b59d1b30fba to your computer and use it in GitHub Desktop.
Save m-hiyama/74f3a6f57b59d1b30fba to your computer and use it in GitHub Desktop.
PowerShell profile script
# -*- coding: sjis -*-
write-host "This is" $myInvocation.myCommand.path
# $env:HOME の設定
if (-not $env:HOME) {
$env:HOME = $home
}
(get-psProvider filesystem).home = $env:HOME
#
# .profile.ps の読み込み
#
if (test-path "$env:HOME\.profile.ps1" -pathType leaf) {
$myProfile = "$env:HOME\.profile.ps1"
} elseif (test-path "$env:HOME\configs\powershell\.profile.ps1" -pathType leaf) {
$myProfile = "$env:HOME\configs\powershell\.profile.ps1"
}
if ($myProfile) {
write-host " loading" $myProfile
. $myProfile
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment