mirror of
https://github.com/JanDeDobbeleer/oh-my-posh.git
synced 2025-02-02 05:41:10 -08:00
fix: correct hyperlinks for Git Bash
kill it with fire
This commit is contained in:
parent
7563d5f4ad
commit
eb1cf548cd
|
@ -69,7 +69,7 @@ func TestPrintPWD(t *testing.T) {
|
||||||
Pwd: `C:\Users\user\Documents\GitHub\oh-my-posh`,
|
Pwd: `C:\Users\user\Documents\GitHub\oh-my-posh`,
|
||||||
Config: terminal.OSC99,
|
Config: terminal.OSC99,
|
||||||
Shell: shell.BASH,
|
Shell: shell.BASH,
|
||||||
Expected: "\x1b]9;9;C:\\Users\\user\\Documents\\GitHub\\oh-my-posh\x1b\\",
|
Expected: "\x1b]9;9;C:/Users/user/Documents/GitHub/oh-my-posh\x1b\\",
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -163,9 +163,11 @@ func Pwd(pwdType, userName, hostName, pwd string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
if strings.HasSuffix(pwd, ":") {
|
if strings.HasSuffix(pwd, ":") {
|
||||||
pwd += "\\"
|
pwd += `/`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pwd = strings.ReplaceAll(pwd, `\`, `/`)
|
||||||
|
|
||||||
switch pwdType {
|
switch pwdType {
|
||||||
case OSC7:
|
case OSC7:
|
||||||
return fmt.Sprintf(formats.Osc7, hostName, pwd)
|
return fmt.Sprintf(formats.Osc7, hostName, pwd)
|
||||||
|
|
Loading…
Reference in a new issue