From 14534c573ae0c501ff57ad81f2645395c43e2cb5 Mon Sep 17 00:00:00 2001 From: Carl Edquist Date: Thu, 6 Oct 2022 01:27:44 -0500 Subject: [PATCH] terminal: WriteTerminalTitle to terminal not stdout The terminal title output should go to the same place as the rest of the terminal output. It's important _not_ to send it to stdout, where it would get included with the main program output when redirected to a file - for instance with the rclone cat command. --- lib/terminal/terminal_normal.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/terminal/terminal_normal.go b/lib/terminal/terminal_normal.go index f84affbaa..6bec79c9c 100644 --- a/lib/terminal/terminal_normal.go +++ b/lib/terminal/terminal_normal.go @@ -34,5 +34,5 @@ func ReadPassword(fd int) ([]byte, error) { // WriteTerminalTitle writes a string to the terminal title func WriteTerminalTitle(title string) { - fmt.Printf(ChangeTitle + title + BEL) + fmt.Fprintf(TerminalOutput, ChangeTitle + title + BEL) }