Make %1 expand to whole input or item text

This keep backwards compatibility.

If %1 is used in command and there is no regular expression, use input
data instead.
Only captured texts are passed to scripts to omit long argument list