-
-
Notifications
You must be signed in to change notification settings - Fork 73
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Termenv output can be a buffer, ssh session, a file, or anything that implements the io.Writer interface. In the case of an ssh session, the std ssh library returns a io.ReadWriter for ssh sessions and the current Termenv implementation makes it impossible to read terminal status reports since it expects a file in return. In addition, the TTY() function is confusing since it implies that the returned value is a TTY. Which is not always true until we check that using the isTTY() function. Deprecate TTY() in favor of Writer() which simply returns the underlying writer. The caller then can infer the type of the writer and decide what to do with it. This also reverts parts of commit 669c9ab 669c9ab Specifically, it removes the File interface.
- Loading branch information
1 parent
b57cbb1
commit efeeaef
Showing
5 changed files
with
69 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.