mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-31 23:11:28 +01:00
fix wsh output. all output is run through sprintf, so escape properly (#971)
This commit is contained in:
parent
f05032bcd4
commit
f835441507
@ -55,7 +55,7 @@ func getMetaRun(cmd *cobra.Command, args []string) {
|
||||
return
|
||||
}
|
||||
outStr := string(outBArr)
|
||||
WriteStdout(outStr + "\n")
|
||||
WriteStdout("%s\n", outStr)
|
||||
} else {
|
||||
outBArr, err := json.MarshalIndent(resp, "", " ")
|
||||
if err != nil {
|
||||
@ -63,6 +63,6 @@ func getMetaRun(cmd *cobra.Command, args []string) {
|
||||
return
|
||||
}
|
||||
outStr := string(outBArr)
|
||||
WriteStdout(outStr + "\n")
|
||||
WriteStdout("%s\n", outStr)
|
||||
}
|
||||
}
|
||||
|
@ -49,5 +49,5 @@ func runReadFile(cmd *cobra.Command, args []string) {
|
||||
WriteStderr("[error] decoding file: %v\n", err)
|
||||
return
|
||||
}
|
||||
WriteStdout(string(resp))
|
||||
WriteStdout("%s", string(resp))
|
||||
}
|
||||
|
@ -25,7 +25,7 @@ var shellCmd = &cobra.Command{
|
||||
Hidden: true,
|
||||
Short: "Print the login shell of this user",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
WriteStdout(shellCmdInner())
|
||||
WriteStdout("%s", shellCmdInner())
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -4,8 +4,6 @@
|
||||
package cmd
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/wavetermdev/waveterm/pkg/wavebase"
|
||||
)
|
||||
@ -18,6 +16,6 @@ var versionCmd = &cobra.Command{
|
||||
Use: "version",
|
||||
Short: "Print the version number of wsh",
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
WriteStdout(fmt.Sprintf("wsh v%s\n", wavebase.WaveVersion))
|
||||
WriteStdout("wsh v%s\n", wavebase.WaveVersion)
|
||||
},
|
||||
}
|
||||
|
@ -86,5 +86,13 @@
|
||||
"bg": "linear-gradient(135deg, rgba(204, 51, 255, 0.9) 0%, rgba(255, 85, 153, 0.75) 30%, rgba(255, 51, 153, 0.65) 60%, rgba(204, 51, 255, 0.6) 80%, rgba(51, 102, 255, 0.5) 100%), radial-gradient(circle at 30% 40%, rgba(255,255,255,0.1), transparent 60%), radial-gradient(circle at 70% 70%, rgba(255,255,255,0.05), transparent 70%)",
|
||||
"bg:opacity": 0.9,
|
||||
"bg:blendmode": "overlay"
|
||||
},
|
||||
"bg@twilight-ember": {
|
||||
"display:name": "Twilight Ember",
|
||||
"display:order": 3.5,
|
||||
"bg:*": true,
|
||||
"bg": "linear-gradient(120deg,hsla(350, 65%, 57%, 1),hsla(30,60%,60%, .75), hsla(208,69%,50%,.15), hsl(230,60%,40%)),radial-gradient(at top right,hsla(300,60%,70%,0.3),transparent),radial-gradient(at top left,hsla(330,100%,70%,.20),transparent),radial-gradient(at top right,hsla(190,100%,40%,.20),transparent),radial-gradient(at bottom left,hsla(323,54%,50%,.5),transparent),radial-gradient(at bottom left,hsla(144,54%,50%,.25),transparent)",
|
||||
"bg:blendmode": "overlay",
|
||||
"bg:text": "rgb(200, 200, 200)"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user