summaryrefslogtreecommitdiffstats
path: root/smenu.1
diff options
context:
space:
mode:
authorpgen <p.gen.progs@gmail.com>2015-09-17 20:08:05 +0200
committerpgen <p.gen.progs@gmail.com>2015-09-17 20:15:35 +0200
commit384c8623fefda1592850eae0d33a1ebde2faa63f (patch)
tree1a36e30cd76a7c3bfb0a31c28e70ae25f64d041c /smenu.1
parent33b514745bfbb6b61e52ac0186a9c4c7ef693d07 (diff)
Add the notion of selectable and non-selectable words
The aim is to only be able to select selectable words. Two new options, -i and -e, are introduced to include (respectively exclude) words from the selectable set each of these options accept an extended regular expression.
Diffstat (limited to 'smenu.1')
-rw-r--r--smenu.117
1 files changed, 15 insertions, 2 deletions
diff --git a/smenu.1 b/smenu.1
index 28998eb..7e34247 100644
--- a/smenu.1
+++ b/smenu.1
@@ -5,14 +5,21 @@ and outputs the selection to stdout.
.SH SYNOPSIS
smenu [\fB-h\fP] [\fB-n\fP \fIlines\fP] [\fB-t\fP [\fIcols\fP]]
[\fB-s\fP \fIpattern\fP] [\fB-m\fP \fImessage\fP] [\fB-w\fP] [\fB-d\fP]
-[\fB-c\fP] [\fB-r\fP] [\fB-b\fP] [\fB-g\fP] [\fB-q\fP]
-[\fB-W\fP bytes] [\fB-L\fP bytes] [\fB-V\fP]
+[\fB-c\fP] [\fB-r\fP] [\fB-b\fP] [\fB-i\fP regex] [\fB-e\fP regex]
+[\fB-g\fP] [\fB-q\fP] [\fB-W\fP bytes] [\fB-L\fP bytes] [\fB-V\fP]
.SH DESCRIPTION
This small utility acts as a filter (reads from stdin and writes to
stdout). All the words taken from stdin are presented in a scrolling
window on the terminal with a selection cursor initially positioned on
the first word by default.
.P
+It is possible to filter the selectable words in the input stream by
+using an include regular expression to match the selectable words
+and un exclude regular expression to match the non-selectable words.
+.P
+Non-selectable words will be skipped when moving the selection cursor
+and will not be able to be serached.
+.P
The \fB-W\fP option can be used to specify the characters (or multibyte
sequences) which will be used to delimit the input words. The default
delimiters are: \fISPACE\fP, \fI\\t\fP and \fI\\n\fP.
@@ -229,6 +236,12 @@ information visible on the terminal.
Enables \fBENTER\fP to validate the selection even in search mode.
.IP \fB-b\fP
Replace all non-printable characters by a blank.
+.IP \fB-i regex\fP
+Sets the \fBi\fPnclude filter to match the selectable words.
+.IP \fB-e regex\fP
+Sets the \fBe\fPxclude filter to match the non-selectable words.
+
+This filter has a higher priority the the include filter.
.IP \fB-g\fP
Replaces the blank after each words in normal tabular mode by a vertical
bar "\fB|\fP". Some users may find the output more readable like that.