Support GNU-style long options throughout, and introduce proper help
[xtoys] / xgetline.1
CommitLineData
90b2c5d4 1.TH xgetline 1 "15 November 1998" "Edgeware tools"
2.SH NAME
3xgetline \- request a line of text in an X dialogue box
4.SH SYNOPSIS
5.B xgetline
f3b35b6b 6.RB [ -i ]
90b2c5d4 7.RB [ \-t
8.IR title ]
9.RB [ \-p
10.IR prompt ]
11.RB [ \-d
12.IR default ]
13.SH DESCRIPTION
14The
15.B xgetline
16program reads a line of text from the user via a pretty GTK dialogue
17box. The title bar contents, prompt string, and default text are all
18configurable. If the user enters a string and clicks the
19.B OK
20button (or
21presses
22.IR enter ),
23the string is echoed to standard output and
24.B xgetline
25returns an exit status of zero. If the user cancels the dialogue box
26(by closing it, or pressing
27.IR escape ),
28.B xgetline
29echoes nothing and returns an exit status of one.
30.PP
31The
32.B xgetline
33program is intended to be used in window manager configuration files, to
34allow users to fill in bits of text (e.g., hostnames or shell commands)
35in generally useful places. For example, the author has the following
36shell command attached to a hotkey:
37.PP
38.RS 5
39.ft B
40.nf
41cmd=`xgetline -t "Shell command in window" -p "Command:"` &&
42 xterm -T "$cmd" -e sh -c "$cmd"
43.ft R
44.fi
45.SS OPTIONS
46.TP 5
f3b35b6b 47.B \-i, \-\-invisible
48Don't echo characters to the screen when they're typed. Useful when
49requesting passwords and similar secrets.
50.TP 5
90b2c5d4 51.BI "\-t, \-\-title " title
52Sets the title of the dialogue box to
53.IR title .
54The default title is
55.RB ` "Input request" '.
56.TP 5
57.BI "\-p, \-\-prompt " prompt
58Sets the prompt string in the dialogue box to
59.IR prompt .
60The default is to have no prompt string.
61.TP 5
62.BI "\-d, \-\-default " default
63Sets the default text in the entry field to
64.IR default .
65The default default is the empty string.
66.SH AUTHOR
67Mark Wooding (mdw@nsict.org).
68.SH BUGS
69Hopefully none.