mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-05-29 23:17:32 +02:00
apply formatting
This commit is contained in:
parent
3067c2c321
commit
4d54b3801f
@ -1,26 +1,26 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func isWSL() bool {
|
func isWSL() bool {
|
||||||
data, err := ioutil.ReadFile("/proc/sys/kernel/osrelease");
|
data, err := ioutil.ReadFile("/proc/sys/kernel/osrelease")
|
||||||
return err == nil && strings.Contains(string(data), "microsoft")
|
return err == nil && strings.Contains(string(data), "microsoft")
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetPlatformDefaultConfig gets the defaults for the platform
|
// GetPlatformDefaultConfig gets the defaults for the platform
|
||||||
func GetPlatformDefaultConfig() OSConfig {
|
func GetPlatformDefaultConfig() OSConfig {
|
||||||
|
|
||||||
if isWSL() {
|
if isWSL() {
|
||||||
return OSConfig{
|
return OSConfig{
|
||||||
EditCommand: ``,
|
EditCommand: ``,
|
||||||
EditCommandTemplate: "",
|
EditCommandTemplate: "",
|
||||||
OpenCommand: `powershell.exe start explorer.exe {{filename}} >/dev/null`,
|
OpenCommand: `powershell.exe start explorer.exe {{filename}} >/dev/null`,
|
||||||
OpenLinkCommand: `powershell.exe start {{link}} >/dev/null`,
|
OpenLinkCommand: `powershell.exe start {{link}} >/dev/null`,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return OSConfig{
|
return OSConfig{
|
||||||
EditCommand: ``,
|
EditCommand: ``,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user