-
Notifications
You must be signed in to change notification settings - Fork 50
Direct access to words
smenu provides a way to directly access all or part of all words.
These accesses are materialized on screen by a alphanumeric prefix in front of each word.
The options -N
, -U
, -F
and -D
are
involved in this mode.
The -D
option allows the user to give sub-options to tune the
behaviour of the other options.
To access the desired word directly, the user just has to enter his number. Here is a short demonstration with default tunings:
smenu -t -N .
To enter a direct access index, the timing is important: the maximum delay between two digits must not be more than 0.6 second by default. If not the digits already entered will form a truncated index. As suggested above, this delay is configurable.
As said above too, it is possible to select the words that will benefit
from direct access. In this page, only the -N
and -U
will be demoed. For more informations about the use of -F
,
see here.
For the -D
option a commented example can be found
here.
To be able to only choose some words for direct access, just add a
regular expression after -N
or -U
.
The difference between the two options is that -N
will select
all the words matching the expression while -U
will select all
the words except those matching the expression.
If there is no conflict with the other options present in the command
line, then these options can be used without any regular expression in
which case .
is assumed which select all the words.
The following example shows a direct access restriction to words
containing a a
.
smenu -t -N a
Note that the word numbering is not the same. The selected words are always associated with numbers that follow each other with these options.
Words are still accessible even when they do not have an associated direct access number:
smenu -t -N a
If it is not desired, then just disable the other words by using the
include option (-i
) with the same regular expression.
smenu -t -i a -N a
Example using in exclude (-e
) and un-number (-U
)
options:
smenu -t -e a -U a
To restart the animations, refresh the page (shift refresh on Netscape based browsers).
smenu illustrated concepts and examples: