8 replcmd - Wrap any command in a REPL interface
12 replcmd I<COMMAND> [I<ARGS>]
16 Run I<COMMAND> repeatedly with words read from STDIN appended to its argument list after I<ARGS>.
17 You may add prompt, history, and other CLI-goodies on top of replcmd(1) by eg. rlwrap(1).
19 =head1 RUNTIME COMMANDS
25 Run I<COMMAND> I<ARGS> I<WORDS>.
26 I<WORDS> get split on C<$IFS>.
28 =item # [I<PARAM-1> [I<PARAM-2> [...]]]
30 Prefix the line with a C<#> hash mark to
31 set fixed parameters for I<COMMAND>.
32 These will be inserted between I<ARGS> and I<WORDS> read form STDIN.
38 rlwrap --remember --command-name dict --substitute-prompt "dict> " replcmd dict
56 if [[ $line =~ ^
#\s*(.+) ]]
58 fixed_params
=(${BASH_REMATCH[1]})
62 if [ ${#words[@]} != 0 ]
64 "$@" "${fixed_params[@]}" "${words[@]}"