1
mirror of https://github.com/rclone/rclone synced 2024-12-25 17:03:45 +01:00
rclone/lib/terminal/terminal_unsupported.go
LaSombra aac2406e19
cmd: add --progress-terminal-title to print ETA to terminal title
Adds a flag, --progress-terminal-title, that when used with --progress,
will print the string `ETA: %s` to the terminal title.

This also adds WriteTerminalTitle to lib/terminal
2020-10-06 16:34:26 +01:00

29 lines
743 B
Go

//+build js
package terminal
import "errors"
// GetSize reads the dimensions of the current terminal or returns a
// sensible default
func GetSize() (w, h int) {
return 80, 25
}
// IsTerminal returns whether the fd passed in is a terminal or not
func IsTerminal(fd int) bool {
return false
}
// ReadPassword reads a line of input from a terminal without local echo. This
// is commonly used for inputting passwords and other sensitive data. The slice
// returned does not include the \n.
func ReadPassword(fd int) ([]byte, error) {
return nil, errors.New("can't read password")
}
// WriteTerminalTitle writes a string to the terminal title
func WriteTerminalTitle(title string) {
// Since there's nothing to return, this is a NOOP
}