Define option name. Argument string is processed by
shellwords routine defined in Text::ParseWords module. Be sure that
this module sometimes requires escape backslashes.
Any kind of string can be used for option name but it is not
combined with other options.
option --fromcode --outside='(?s)\/\*.*?\*\/'
option --fromcomment --inside='(?s)\/\*.*?\*\/'
If the option named default is defined, it will be used
as a default option.
For the purpose to include following arguments within replaced
strings, two special notations can be used in option definition.
String "$<n>" is
replaced by the nth argument after the substituted option, where
n is number start from one. Because
"$<0>" is replaced by the
defined option itself, you have to care about infinite loop.
String "$<shift>" is
replaced by following command line argument and the argument is removed
from list.
For example, when
option --line --le &line=$<shift>
is defined, command
greple --line 10,20-30,40
will be evaluated as this:
greple --le &line=10,20-30,40
There are three special arguments to manipulate option
behavior and the rest of arguments. Argument
"$<move>" moves all following
arguments there, "$<remove>"
just removes them, and "$<copy>"
copies them. These does not work when included in a part of string.
They take optional one or two parameters, those are passed to
Perl "splice" function as
offset and length.
"$<move(0,1)>" is same as
"$<shift>";
"$<copy(0,1)>" is same as
"$<1>";
"$<move>" is same as
"$<move(0)>";
"$<move(-1)>" moves the last
argument; "$move(1,1)" moves second
argument. Next example exchange following two arguments.
option --exch $<move(1,1)>
Because "$<move(0,0)>"
does nothing, you can use it to ignore option.
option --deprecated $<move(0,0)>