45 lines
766 B
Groff
45 lines
766 B
Groff
.Dd December 15, 2025
|
|
.Dt PICK 1
|
|
.Os
|
|
.Sh NAME
|
|
.Nm pick
|
|
.Nd choose interactively from a set of arguments and input lines
|
|
.Sh SYNOPSIS
|
|
.Nm
|
|
.Ar arg ...
|
|
.Sh DESCRIPTION
|
|
.Nm
|
|
will display a Korn shell style selection menu with any arguments as options.
|
|
The special argument
|
|
.Ar --
|
|
will read stdin and present each line as a choice.
|
|
.Pp
|
|
When a selection is made, the command will print its value to stdout;
|
|
If the selection is aborted, nothing will be printed.
|
|
.Sh ENVIRONMENT
|
|
.Bl -tag -width PS3
|
|
.It Ev PS3
|
|
Prompt string displayed to the user (default: #?).
|
|
.El
|
|
.Sh EXIT STATUS
|
|
.Ex -std
|
|
.Sh EXAMPLES
|
|
.Bd -literal -offset indent
|
|
$ pick 1 2 -- 3 4 <<.
|
|
> a
|
|
> b
|
|
> c
|
|
> .
|
|
1) 1
|
|
2) 2
|
|
3) a
|
|
4) b
|
|
5) c
|
|
6) 3
|
|
7) 4
|
|
#? 4
|
|
b
|
|
.Ed
|
|
.Sh AUTHORS
|
|
.An Adolfo Perez Alvarez Aq Mt adolfopa@sdf.org
|