X-Git-Url: https://git.distorted.org.uk/~mdw/xtoys/blobdiff_plain/f3b35b6bbd646fb0e676ef3d64c91b38ff9f9162..3e878a32d634bc4f779390c59583e552c880f38c:/xgetline.1 diff --git a/xgetline.1 b/xgetline.1 index 2cc2079..99a4db4 100644 --- a/xgetline.1 +++ b/xgetline.1 @@ -1,15 +1,21 @@ -.TH xgetline 1 "15 November 1998" "Edgeware tools" +.\" -*-nroff-*- +.TH xgetline 1 "15 November 1998" "Straylight/Edgeware" "xtoys" .SH NAME xgetline \- request a line of text in an X dialogue box .SH SYNOPSIS .B xgetline -.RB [ -i ] -.RB [ \-t -.IR title ] -.RB [ \-p -.IR prompt ] +.RI [ gtk-options ...] +.RB [ -Hin ] +.RB [ \- M +.IR max ] .RB [ \-d .IR default ] +.RB [ \-l +.IR file ] +.RB [ \-p +.IR prompt ] +.RB [ \-t +.IR title ] .SH DESCRIPTION The .B xgetline @@ -38,32 +44,69 @@ shell command attached to a hotkey: .RS 5 .ft B .nf -cmd=`xgetline -t "Shell command in window" -p "Command:"` && +cmd=$(xgetline -t "Shell command in window" -p "_Command:") && xterm -T "$cmd" -e sh -c "$cmd" .ft R .fi -.SS OPTIONS +.SS Options +.TP 5 +.B "\-H, \-\-history" +With +.BR \-l , +update the file with the newly entered line at the top. Other lines +matching the newly entered string are not written. No effect without +.BR \-l . +.TP 5 +.BI "\-M, \-\-histmax " max +When writing an updated history file, do not write more than +.I max +lines. The default is 20; a value of 0 disables a length limit on the +history file. +.TP 5 +.BI "\-d, \-\-default " default +Sets the default text in the entry field to +.IR default . +The default default is the first item in the empty string. The special +default string +.RB ` @ ' +sets the default to be the first item in the history list, if one is +supplied. .TP 5 .B \-i, \-\-invisible Don't echo characters to the screen when they're typed. Useful when requesting passwords and similar secrets. .TP 5 -.BI "\-t, \-\-title " title -Sets the title of the dialogue box to -.IR title . -The default title is -.RB ` "Input request" '. +.BI "\-l, \-\-list " file +Reads a list of alternatives from +.I file +and displays them in a drop-down list box. The user can rapidly select +an item from the drop-down list using the mouse or cursor keys. The +file is not modified (but see the +.B \-\-history +option below). +.TP 5 +.B "\-n, \-\-no-choice" +One of the items from the selection list must be chosen; the user may +not type an entry in directly. .TP 5 .BI "\-p, \-\-prompt " prompt Sets the prompt string in the dialogue box to .IR prompt . -The default is to have no prompt string. +If the prompt string contains an underscore character +.RB ` _ ', +then the following character appears underlined; pressing Alt and the +leftmost underlined character (the `mnemonic') moves the input focus to +the entry widget. If you want a literal underscore, type two +consecutive underscores. The default is to have no prompt string. .TP 5 -.BI "\-d, \-\-default " default -Sets the default text in the entry field to -.IR default . -The default default is the empty string. -.SH AUTHOR -Mark Wooding (mdw@nsict.org). +.BI "\-t, \-\-title " title +Sets the title of the dialogue box to +.IR title . +The default title is +.RB ` "Input request" '. .SH BUGS Hopefully none. +.SH SEE ALSO +.BR gtk-options (7). +.SH AUTHOR +Mark Wooding (mdw@distorted.org.uk).