mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-11 04:15:48 +02:00
Fix opening files with explorer in WSL
The OS command to open file in explorer in WSL doesn't currently work as expected; it always opens the file explorer at the default opening location. This is because the {{filename}} variable returns the path in WSL format, and not in the format expected by Windows. We use wslpath, a utility shipped with WSL, to make the path conversion.
This commit is contained in:
parent
3a4422fc68
commit
4cfeb18632
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ func isContainer() bool {
|
|||
func GetPlatformDefaultConfig() OSConfig {
|
||||
if isWSL() && !isContainer() {
|
||||
return OSConfig{
|
||||
Open: `powershell.exe start explorer.exe {{filename}} >/dev/null`,
|
||||
Open: `powershell.exe start explorer.exe "$(wslpath -w {{filename}})" >/dev/null`,
|
||||
OpenLink: `powershell.exe start {{link}} >/dev/null`,
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue