dirty 1.) rc -c 'git '^
note the space after git

idiomatic 1.) use win(1), pass 'command' argument a script which executes
git for each line of input as arguments through rc(1) to evaluate the
arguments in the usual way

2.) you can pass complex regular expression as argument to grep(1), without
rc(1) choking on metacharacters.
the argument is guaranteed not to have unforeseen side effects.


example win(1) script:
#!/usr/bin/env rc

orig_ifs = $ifs

PAGER=cat

while (true) {
    ifs=''
    echo -n 'git> '
    line = `{read}
    ifs = $orig_ifs
    rc -c 'git '^ $line
}

Reply via email to