mirror of
https://github.com/rclone/rclone.git
synced 2025-08-16 00:28:09 +02:00
bisync: fix --colors flag
quick fix to get around lack of support in fs.Infof etc.
This commit is contained in:
@ -62,8 +62,13 @@ func quotePath(path string) string {
|
||||
return escapePath(path, true)
|
||||
}
|
||||
|
||||
var Colors bool // Colors controls whether terminal colors are enabled
|
||||
|
||||
// Color handles terminal colors for bisync
|
||||
func Color(style string, s string) string {
|
||||
if !Colors {
|
||||
return s
|
||||
}
|
||||
terminal.Start()
|
||||
return style + s + terminal.Reset
|
||||
}
|
||||
|
Reference in New Issue
Block a user