Skip to content

Instantly share code, notes, and snippets.

@tomoh1r
Created October 22, 2014 12:03
Show Gist options
  • Save tomoh1r/8c15ce88f31396ade9a1 to your computer and use it in GitHub Desktop.
Save tomoh1r/8c15ce88f31396ade9a1 to your computer and use it in GitHub Desktop.
ホームディレクトリを ~ にするなど
$_path = $(Get-Location).Path
if ($_path.IndexOf($ENV:HOME) -eq 0) {
$_path = Join-Path '~' ($PWD.ProviderPath.Remove(0, ($ENV:HOME).Length))
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment