Cygwinの home ディレクトリはデフォルトだと c:\cgywin64\home\USERNAME の場所になる。
これを変更するのは、/etc/nsswitch.conf を修正するのが良いらしい (参考にしたページ:Cygwin の ホーム ディレクトリ を変更する [ほうほう爺の独り言] )。
例えば
dh_home: /cygdrive/c/somewhere/over/the/rainbow
のように書く。
pathにスペースがあるのは、Cygwinでは禁忌らしく避ける必要がある。
そこで 古式ゆかしい8.3フォーマットで書くことになる。
8.3フォーマットをPowershellで表示させるのは以下のようにやる(参考にしたページ: DOS 8.3 short paths via PowerShell | Adam Dimech’s Coding Blog):
$path = (dir show83.ps1).FullName
"Long path: $path"
# convert it to 8.3 short name
$object = New-Object -ComObject Scripting.FileSystemObject
$output = $object.GetFile($path)
$output.shortpath.trim("show83.ps1") | Out-Null #Generates 8.3 short file path output
Write-Host "`n`n The short path of this directory is" $output.shortpath.trim("show83.ps1")












