From: ori@eigenstate.org
To: echoline@gmail.com, 9front@9front.org
Subject: Re: [9front] bug with drawterm -G then rcpu
Date: Sun, 01 Nov 2020 11:58:36 -0800 [thread overview]
Message-ID: <A12078269A4675885C2DEC44755A3976@eigenstate.org> (raw)
In-Reply-To: <CAHwi9byEGJ8Wqx4npXRE9ytyc2Up=rC=ewAH+vBH7GiNKKk43g@mail.gmail.com>
> I found that when I drawterm -G then rcpu from inside it, the default
> lib/profile fails with "null list in concatenation." this seems to fix
> it but I'm not sure it's the best way:
>
> --- /sys/lib/dist/usr/glenda/lib/profile Fri Oct 4 17:33:29 2019
> +++ lib/profile Tue Oct 27 19:20:06 2020
> @@ -19,7 +19,7 @@
> bind -q /mnt/term/dev/consctl /dev/consctl
> >[2] /dev/null {
> cp /dev/sysname /mnt/term/dev/label
> - if(wsys=`{cat /mnt/term/env/wsys})
> + if(wsys=`{cat /mnt/term/env/wsys} && ! ~ $#wsys 0)
> wsys=/mnt/term^$wsys
> }
> bind -a /mnt/term/dev /dev
This is a hack. The issue is that
wsys=`{...}
creates an empty variable if the command fails. How does this look?
--- a/sys/lib/dist/usr/glenda/lib/profile Sun Nov 01 11:56:26 2020 -0800
+++ b/sys/lib/dist/usr/glenda/lib/profile Sun Nov 01 11:58:15 2020 -0800
@@ -19,8 +19,8 @@
bind -q /mnt/term/dev/consctl /dev/consctl
>[2] /dev/null {
cp /dev/sysname /mnt/term/dev/label
- if(wsys=`{cat /mnt/term/env/wsys})
- wsys=/mnt/term^$wsys
+ if(test -f /mnt/term/env/wsys)
+ wsys=/mnt/term^`{cat /mnt/term/env/wsys}
}
bind -a /mnt/term/dev /dev
prompt=('cpu% ' ' ')
prev parent reply other threads:[~2020-11-01 19:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-28 2:34 Eli Cohen
2020-11-01 19:58 ` ori [this message]
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=A12078269A4675885C2DEC44755A3976@eigenstate.org \
--to=ori@eigenstate.org \
--cc=9front@9front.org \
--cc=echoline@gmail.com \
/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).