Refactor tty(1) code and manpage
This commit is contained in:
parent
352eedff58
commit
018d60c6bf
2
README
2
README
|
@ -71,7 +71,7 @@ The following tools are implemented ('*' == finished, '#' == UTF-8 support,
|
|||
= touch no -r
|
||||
#* tr yes none
|
||||
=* true yes none
|
||||
= tty yes none
|
||||
=* tty yes none
|
||||
= uname yes none
|
||||
# unexpand yes none
|
||||
= uniq no -f, -s
|
||||
|
|
22
tty.1
22
tty.1
|
@ -1,4 +1,4 @@
|
|||
.Dd January 30, 2015
|
||||
.Dd February 7, 2015
|
||||
.Dt TTY 1
|
||||
.Os sbase
|
||||
.Sh NAME
|
||||
|
@ -8,9 +8,21 @@
|
|||
.Nm
|
||||
.Sh DESCRIPTION
|
||||
.Nm
|
||||
prints the name of the terminal open on stdin.
|
||||
.Pp
|
||||
The status code is 0 if stdin is a terminal, and 1 if not. If an error occurred
|
||||
the status code is 2.
|
||||
writes the name of the terminal open on stdin to stdout.
|
||||
.Sh EXIT STATUS
|
||||
.Bl -tag -width Ds
|
||||
.It 0
|
||||
stdin is a terminal.
|
||||
.It 1
|
||||
stdin is not a terminal.
|
||||
.It > 1
|
||||
An error occurred.
|
||||
.El
|
||||
.Sh SEE ALSO
|
||||
.Xr ttyname 3
|
||||
.Sh STANDARDS
|
||||
The
|
||||
.Nm
|
||||
utility is compliant with the
|
||||
.St -p1003.1-2008
|
||||
specification.
|
||||
|
|
Loading…
Reference in New Issue
Block a user