diff options
-rw-r--r-- | lib/choose_repository.tcl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl index bf0436146..2bac50e14 100644 --- a/lib/choose_repository.tcl +++ b/lib/choose_repository.tcl @@ -140,12 +140,16 @@ constructor pick {} { $w_recentlist tag conf link \ -foreground blue \ -underline 1 - set home "[file normalize $::env(HOME)][file separator]" + set home $::env(HOME) + if {[is_Cygwin]} { + set home [exec cygpath --windows --absolute $home] + } + set home "[file normalize $home]/" set hlen [string length $home] foreach p $sorted_recent { set path $p if {[string equal -length $hlen $home $p]} { - set p "~[file separator][string range $p $hlen end]" + set p "~/[string range $p $hlen end]" } regsub -all "\n" $p "\\n" p $w_recentlist insert end $p link |