Skip to content

Instantly share code, notes, and snippets.

@tomoh1r
Created Oct 22, 2014
Embed
What would you like to do?
ホームディレクトリを ~ にするなど
$_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