Skip to content

Filtering words

pgen edited this page Oct 27, 2023 · 3 revisions

smenu offers the possibility to make only certain words selectable or not selectable.

This feature is based on what's called regular expressions, more precisely, extended regular expressions.

Columns/Rows can also be made selectable/non selectable, see here for some explanations.

The involved options are -i (include) and -e (exclude).

The included and or excluded words can be displayed using various attributes. In the following animations, the default ones are used (cyan for the excluded word).

Some examples:

Makes only some words selectable (include them):

smenu -t -i "a.*e"

smenu -t -i "a.*e"

Makes only some words non selectable (exclude then):

smenu -t -e "a.*e"

smenu -t -e "a.*e"

include and exclude regular expressions can be provides at the same time. Note that once a word has been excluded, it cannot be made selectable again:

smenu -t -i a -e "a.*e"

smenu -t -i a -e "a.*e"

include and exclude options can appear more than once with a cumulative effect:

smenu -t -i a -e "a.*e" -i e

smenu -t -i a -e "a.*e" -i e

smenu -t -e g -i "i|l" -e o

smenu -t -e g -i "i|l" -e o