"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files
Go azure-blobazure-blob-storageazure-filesbackblaze-b2cloud-storagedropboxencryptionftpfuse-filesystemgogolanggoogle-cloud-storagegoogle-driveonedriveopenstack-swiftrclones3sftpsyncwebdav
lib/terminal: enable windows console virtual terminal sequences processing (ANSI/VT100 colors)
albertonyf9d50f677d61
diff --git a/cmd/cmd.go b/cmd/cmd.goindex f6365cee8..73fe98a2d 100644--- a/cmd/cmd.go+++ b/cmd/cmd.go@@ -401,9 +401,15 @@ func initConfig() {// Start accountingaccounting.Start(ctx)- // Hide console window+ // Configure consoleif ci.NoConsole {+ // Hide the console windowterminal.HideConsole()+ } else {+ // Enable color support on stdout if possible.+ // This enables virtual terminal processing on Windows 10,+ // adding native support for ANSI/VT100 escape sequences.+ terminal.EnableColorsStdout()}// Load filtersdiff --git a/lib/terminal/terminal.go b/lib/terminal/terminal.goindex 532cf1fcc..f933de719 100644--- a/lib/terminal/terminal.go+++ b/lib/terminal/terminal.go@@ -111,3 +111,14 @@ func Write(out []byte) {Start()_, _ = Out.Write(out)}++// EnableColorsStdout enable colors if possible.+// This enables virtual terminal processing on Windows 10 console,+// adding native support for VT100 escape codes. When this terminal+// package is used for output, the result is that the colorable library+// don't have to decode the escapes and explicitely write text with color+// formatting to the console using Windows API functions, but can simply+// relay everything to stdout.+func EnableColorsStdout() {+ _ = colorable.EnableColorsStdout(nil)+}