Skip to content

Commit

Permalink
修正 windows 提示
Browse files Browse the repository at this point in the history
  • Loading branch information
Becivells committed Dec 27, 2021
1 parent c79fe9c commit 1ce4133
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/cli/help.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,15 @@ var UsageLists = []fgx{

func PrintSingleUsage() {
ulen := len(UsageLists)
sug := UsageLists[rand.Intn(ulen)].String()
sug := UsageLists[rand.Intn(ulen)]
fmt.Println("Tips:")
fmt.Println("If you want to view the trial in your browser, try -open")
fmt.Println("")
if runtime.GOOS == "windows" {
fmt.Println(`windows 命令行下下需要特别注意双引号转义eg: ( 'fx=\"google-reverse\"' )`)
sug := "fofax.exe" + strings.TrimPrefix(sug, "fofax")
fmt.Println(strings.ReplaceAll(sug, "\"", "\\\""))
sug.Usage = strings.ReplaceAll(sug.Usage, "fofax", "fofax.exe")
fmt.Println(strings.ReplaceAll(sug.String(), "\"", "\\\""))
return
}
magenta(sug)
magenta(sug.String())
}

0 comments on commit 1ce4133

Please sign in to comment.