From: erik quanstrom <quanstro@quanstro.net>
To: 9fans@9fans.net
Subject: Re: [9fans] spaces in filenames (and filesystems...)
Date: Fri, 29 Apr 2011 21:09:58 -0400 [thread overview]
Message-ID: <0293e3961df7c047ffef96c2fc6939ae@brasstown.quanstro.net> (raw)
In-Reply-To: <1304104623.9113.1446566425@webmail.messagingengine.com>
> > this is one thing that byron understood in his version of rc.
> > he had
> > x=``ifs {cmd}
> > the `` was required since `singleton was allowed in his version.
> > i think that one could just extend the grammar to allow
> > x=`ifs {cmd}
> > and i think it would be even better if it were
> > x=`splitchars {cmd}
> > so ifs is never set.
>
> I don't quite understand the first two examples. Do they set ifs only
> within the {} ? I guess that risks breaking any scripts you might want
> to run as cmd, so yeah, the 3rd looks good.
i implemented the 3d this evening in a compatable way with
Traditional Rc. there's an argument that it's not completely
necessary, but it's so easy to make a mistake and type this
ifs=$something x=`{something}
leaving ifs set rather than the intended
ifs=$something {x=`{something}}
i also don't see a argument against making the splitting string
local to the backq. i don't believe i've ever written a script that
uses the fact that ifs can be set once and reused with it's nonstandard
value.
- erik
----
; 8.out
broken! x=`{echo a b c d}
broken! whatis x
x=(a b c d)
broken! x=`/$nl {pwd}
broken! whatis x
x=(usr quanstro src rc)
broken! ifs=/$nl {x=`{pwd}}
broken! whatis x
x=(usr quanstro src rc)
broken! diffy -c *.[chy]
diff -c /n/dump/2011/0429/usr/quanstro/src/rc/code.c code.c
/n/dump/2011/0429/usr/quanstro/src/rc/code.c:145,158 - code.c:145,167
emitf(Xconc);
break;
case '`':
+ emitf(Xmark);
+ if(c0==0){
+ emitf(Xword);
+ emits(strdup("ifs"));
+ emitf(Xdol);
+ }else{
+ outcode(c0, 0, brkaddr);
+ emitf(Xglob);
+ }
emitf(Xbackq);
if(havefork){
p = emiti(0);
- outcode(c0, 0, brkaddr);
+ outcode(c1, 0, brkaddr);
emitf(Xexit);
stuffdot(p);
} else
- emits(fnstr(c0));
+ emits(fnstr(c1));
break;
case ANDAND:
outcode(c0, 0, brkaddr);
diff -c /n/dump/2011/0429/usr/quanstro/src/rc/havefork.c havefork.c
/n/dump/2011/0429/usr/quanstro/src/rc/havefork.c:83,93 - havefork.c:83,92
int pfd[2];
char *s, *wd, *ewd, *stop;
struct io *f;
- var *ifs = vlook("ifs");
word *v, *nextv;
Rune r;
- stop = ifs->val? ifs->val->word: "";
+ stop = runq->argv->words->word;
if(pipe(pfd)<0){
Xerror("can't make pipe");
return;
/n/dump/2011/0429/usr/quanstro/src/rc/havefork.c:140,145 - havefork.c:139,145
efree(wd);
closeio(f);
Waitfor(pid, 0);
+ popword(); /* ditch split in "stop" */
/* v points to reversed arglist -- reverse it onto argv */
while(v){
nextv = v->next;
/n/dump/2011/0429/usr/quanstro/src/rc/pcmd.c:32,38 - pcmd.c:32,38
break;
case '^': pfmt(f, "%t^%t", c0, c1);
break;
- case '`': pfmt(f, "`%t", c0);
+ case '`': pfmt(f, "`%t%t", c0, c1);
break;
case ANDAND: pfmt(f, "%t && %t", c0, c1);
break;
diff -c /n/dump/2011/0429/usr/quanstro/src/rc/syn.y syn.y
/n/dump/2011/0429/usr/quanstro/src/rc/syn.y:96,102 - syn.y:96,103
| '"' word {$$=tree1('"', $2);}
| COUNT word {$$=tree1(COUNT, $2);}
| WORD
- | '`' brace {$$=tree1('`', $2);}
+ | '`' brace {$$=tree2('`', nil, $2);}
+ | '`' word brace {$$=tree2('`', $2, $3);}
| '(' wordsnl nl ')' {$$=tree1(PAREN, $2);}
| REDIR brace {$$=mung1($1, $2); $$->type=PIPEFD;}
keyword: FOR|IN|WHILE|IF|NOT|TWIDDLE|BANG|SUBSHELL|SWITCH|FN|BREAK
next prev parent reply other threads:[~2011-04-30 1:09 UTC|newest]
Thread overview: 160+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-26 18:08 [9fans] spaces in filenames smiley
2011-04-26 18:42 ` Rob Pike
2011-04-26 18:44 ` erik quanstrom
2011-04-26 18:52 ` dexen deVries
2011-04-26 19:31 ` Rob Pike
2011-04-26 19:35 ` Paul Lalonde
2011-04-27 13:10 ` Digby Tarvin
2011-04-27 13:16 ` erik quanstrom
2011-04-27 13:21 ` Steve Simon
2011-04-28 9:58 ` Peter A. Cejchan
2011-04-28 12:11 ` [9fans] spaces in filenames (and filesystems...) Digby Tarvin
2011-04-28 12:35 ` [9fans] portable filesystem (was: spaces in filenames (and filesystems...)) dexen deVries
2011-04-28 13:42 ` [9fans] portable filesystem (was: spaces in filenames (and Richard Miller
2011-04-28 14:00 ` [9fans] portable filesystem (was: spaces in filenames (and filesystems...)) Digby Tarvin
2011-04-28 14:13 ` dexen deVries
2011-04-28 15:35 ` [9fans] portable filesystem smiley
2011-04-28 15:38 ` [9fans] portable filesystem (was: spaces in filenames (and filesystems...)) Digby Tarvin
2011-04-28 14:18 ` dexen deVries
2011-04-29 13:30 ` [9fans] spaces in filenames (and filesystems...) Ethan Grammatikidis
2011-04-29 14:00 ` erik quanstrom
2011-04-29 15:06 ` Ethan Grammatikidis
2011-04-29 15:17 ` erik quanstrom
2011-04-29 19:17 ` Ethan Grammatikidis
2011-04-30 1:09 ` erik quanstrom [this message]
2011-04-30 2:50 ` smiley
2011-04-30 2:55 ` andrey mirtchovski
2011-04-26 18:43 ` [9fans] spaces in filenames erik quanstrom
2011-04-27 2:30 ` smiley
2011-04-27 2:39 ` erik quanstrom
2011-04-28 15:10 ` [9fans] Compiling 9atom kernel WAS: " smiley
2011-04-28 15:30 ` erik quanstrom
2011-04-28 16:16 ` smiley
2011-04-28 16:21 ` erik quanstrom
2011-04-28 17:23 ` smiley
2011-04-28 17:35 ` andrey mirtchovski
2011-04-28 18:20 ` ron minnich
2011-04-28 18:50 ` Brian L. Stuart
2011-04-28 19:19 ` Jeff Sickel
2011-04-28 19:29 ` dexen deVries
2011-04-28 19:39 ` erik quanstrom
2011-04-29 2:00 ` errno
2011-04-29 3:03 ` erik quanstrom
2011-04-29 6:11 ` errno
2011-04-29 6:34 ` andrey mirtchovski
2011-04-29 9:18 ` Charles Forsyth
2011-04-29 9:12 ` dexen deVries
2011-04-29 9:44 ` Charles Forsyth
2011-04-29 9:44 ` tlaronde
2011-04-29 9:54 ` dexen deVries
2011-04-29 13:56 ` Jeff Sickel
2011-05-05 9:54 ` Greg Comeau
2011-05-08 18:27 ` tlaronde
2011-05-08 20:51 ` Mathieu Lonjaret
2011-05-09 16:54 ` tlaronde
2011-05-09 17:10 ` Wes Kussmaul
2011-05-10 8:34 ` hiro
2011-05-10 12:27 ` andrey mirtchovski
2011-05-13 8:40 ` Akshat Kumar
2011-05-13 10:14 ` hiro
2011-05-13 13:30 ` Wes Kussmaul
2011-05-10 13:47 ` Daniel Lyons
2011-05-12 18:40 ` Wes Kussmaul
2011-05-10 17:56 ` Wes Kussmaul
2011-05-12 22:22 ` hiro
2011-05-10 21:47 ` John Floren
2011-05-08 21:34 ` Comeau At9Fans
2011-05-09 4:53 ` Lucio De Re
2011-04-29 3:11 ` andrey mirtchovski
2011-04-29 5:27 ` ron minnich
2011-04-29 9:04 ` Charles Forsyth
2011-04-29 10:19 ` errno
2011-04-29 12:21 ` Jacob Todd
2011-04-30 4:05 ` errno
2011-04-30 4:22 ` errno
2011-04-30 6:26 ` Anthony Sorace
2011-04-30 8:16 ` errno
2011-04-30 8:25 ` Steve Simon
2011-04-30 9:48 ` errno
2011-05-05 9:55 ` Greg Comeau
2011-04-30 12:18 ` Ethan Grammatikidis
2011-04-30 22:21 ` smiley
2011-04-30 23:20 ` errno
2011-04-30 23:33 ` Lyndon Nerenberg
2011-05-01 0:12 ` errno
2011-05-01 0:16 ` Lyndon Nerenberg
2011-05-01 23:56 ` blstuart
2011-05-02 0:00 ` erik quanstrom
2011-05-02 1:42 ` errno
2011-05-02 1:44 ` erik quanstrom
2011-05-02 2:29 ` errno
2011-05-02 2:38 ` erik quanstrom
2011-05-02 3:11 ` errno
2011-05-02 3:15 ` erik quanstrom
2011-05-02 4:09 ` errno
2011-05-02 3:39 ` ron minnich
2011-05-02 4:05 ` Steve Simon
2011-05-02 10:38 ` Salman Aljammaz
2011-05-02 11:46 ` errno
2011-05-02 16:29 ` Charles Forsyth
2011-05-02 16:48 ` dexen deVries
2011-05-02 11:51 ` Charles Forsyth
2011-05-02 13:54 ` Jack Norton
2011-05-02 14:45 ` Anthony Sorace
2011-05-02 16:16 ` Charles Forsyth
2011-05-05 12:33 ` Greg Comeau
2011-05-05 12:48 ` erik quanstrom
2011-05-06 4:23 ` Lucio De Re
2011-05-06 4:35 ` ron minnich
2011-05-06 6:45 ` errno
2011-05-06 7:08 ` ron minnich
2011-05-06 7:35 ` errno
2011-05-06 15:45 ` Bakul Shah
2011-05-06 15:59 ` John Floren
2011-05-06 16:47 ` Bakul Shah
2011-05-06 16:11 ` tlaronde
2011-05-06 12:07 ` Lucio De Re
2011-05-06 16:07 ` [9fans] freedom (was Re: Compiling 9atom kernel) errno
2011-05-06 16:29 ` Jack Norton
2011-05-06 17:38 ` errno
2011-05-07 0:06 ` errno
2011-05-07 5:01 ` Lucio De Re
2011-05-07 7:36 ` Daniel Lyons
2011-05-16 15:02 ` Steve Simon
2011-05-06 7:08 ` [9fans] Compiling 9atom kernel WAS: Re: spaces in filenames errno
2011-05-06 7:11 ` ron minnich
2011-05-06 12:59 ` erik quanstrom
2011-05-06 16:06 ` errno
2011-05-06 17:30 ` erik quanstrom
2011-05-06 22:32 ` Comeau At9Fans
2011-05-06 22:57 ` andrey mirtchovski
2011-05-06 23:18 ` errno
2011-05-06 23:49 ` Comeau At9Fans
2011-05-06 23:47 ` errno
2011-05-06 23:56 ` Comeau At9Fans
2011-05-07 0:22 ` errno
2011-05-07 0:12 ` Lyndon Nerenberg
2011-05-07 0:43 ` errno
2011-05-06 13:15 ` erik quanstrom
2011-04-30 22:34 ` smiley
2011-04-30 22:45 ` Lyndon Nerenberg
2011-05-01 6:54 ` dexen deVries
2011-05-05 12:33 ` Greg Comeau
2011-05-05 12:54 ` andrey mirtchovski
2011-05-05 20:30 ` Gorka Guardiola
2011-05-05 21:22 ` Iruatã Souza
2011-05-06 5:20 ` Skip Tavakkolian
2011-05-06 7:02 ` Gorka Guardiola
2011-05-06 7:06 ` errno
2011-05-05 9:55 ` Greg Comeau
2011-05-04 11:40 ` Greg Comeau
2011-04-29 12:32 ` erik quanstrom
2011-04-29 18:39 ` Iruatã Souza
2011-04-29 6:06 ` Bakul Shah
2011-04-28 20:50 ` Anthony Sorace
2011-05-04 11:40 ` Balwinder S Dheeman
2011-05-04 11:56 ` erik quanstrom
2011-04-28 18:33 ` erik quanstrom
2011-04-29 4:31 ` smiley
2011-04-29 4:35 ` erik quanstrom
2011-04-28 19:27 ` Charles Forsyth
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=0293e3961df7c047ffef96c2fc6939ae@brasstown.quanstro.net \
--to=quanstro@quanstro.net \
--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).