9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: dexen deVries <dexen.devries@gmail.com>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] Acme 2-1 chord arguments
Date: Wed, 15 Jul 2015 17:41:31 +0200	[thread overview]
Message-ID: <CAJUT6o6=dHLBQZ4WafJhae+K+n1W79V8ywJknCoS0c3kABduBg@mail.gmail.com> (raw)
In-Reply-To: <2967C352-8607-44E6-87FA-DB94B18688DC@icloud.com>

[-- Attachment #1: Type: text/plain, Size: 604 bytes --]

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
}

[-- Attachment #2: Type: text/html, Size: 801 bytes --]

  reply	other threads:[~2015-07-15 15:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-15 14:06 Brian Zwahr
2015-07-15 15:41 ` dexen deVries [this message]
2015-07-16 15:44   ` Brian Zwahr
2015-07-16 16:54 ` Alexander Kapshuk
2015-07-16 17:15   ` Brian Zwahr
2015-07-16 17:39     ` Alexander Kapshuk
2015-07-16 17:45       ` Brian Zwahr
2015-07-16 18:06         ` Alexander Kapshuk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAJUT6o6=dHLBQZ4WafJhae+K+n1W79V8ywJknCoS0c3kABduBg@mail.gmail.com' \
    --to=dexen.devries@gmail.com \
    --cc=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).