* Re: rc error messages from scripts
@ 1999-12-10 7:40 Byron Rakitzis
0 siblings, 0 replies; 5+ messages in thread
From: Byron Rakitzis @ 1999-12-10 7:40 UTC (permalink / raw)
To: fosterd, rc
> Ah. silly me. How about changing the other messages and leaving
> 'segmentation fault' as a special case (ie, no argv[0])? would you
> welcome such a patch?
Let's see:
; ash
$ )
Syntax error: ")" unexpected
$ ; csh
[leica@peanut]$ )
Too many )'s.
[leica@peanut]$ exit
; bash
bash$ )
bash: syntax error near unexpected token `)'
bash$ exit
;
Okay, on my own linux machine it seems only bash puts argv[0] in for its
"private" error messages.
You can argue about whether this is right or wrong but I don't see a
compelling reason to make rc do the same thing as bash. As I mentioned
before, I think there is an argument to be made for rc's errors being
unadorned, as the user is in a sense engaging in a "private" conversation
with rc before any forks or execs have happened. Maybe this is stretching
a metaphor a little too far, but that's how I feel about these parser
error messages.
Byron.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rc error messages from scripts
[not found] <199912090829.AAA23488@peanut.rakitzis.com>
@ 1999-12-09 13:59 ` Decklin Foster
0 siblings, 0 replies; 5+ messages in thread
From: Decklin Foster @ 1999-12-09 13:59 UTC (permalink / raw)
To: rc
Byron Rakitzis writes:
> Also: in general, child processes in the foreground do not need to be
> identified by their pid. It's redundant.
Ah. silly me. How about changing the other messages and leaving
'segmentation fault' as a special case (ie, no argv[0])? would you
welcome such a patch?
--
Decklin
Written with Debian GNU/Linux - http://www.debian.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rc error messages from scripts
@ 1999-12-09 8:10 Byron Rakitzis
0 siblings, 0 replies; 5+ messages in thread
From: Byron Rakitzis @ 1999-12-09 8:10 UTC (permalink / raw)
To: bengt, rc
>scriptname:25
This seems like a really good idea.. and as far as I know Rob spent some
while reworking all the utilities so that the new format error message
could be emitted. No reason why we shouldn't do the same!
Byron.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: rc error messages from scripts
1999-12-08 15:09 Bengt Kleberg
@ 1999-12-09 7:37 ` Decklin Foster
0 siblings, 0 replies; 5+ messages in thread
From: Decklin Foster @ 1999-12-09 7:37 UTC (permalink / raw)
To: rc
Bengt Kleberg writes:
> When developing scripts I sometimes get the error message:
> line 25: syntax error near '('
I agree this is annoying. Equally annoying is this:
; )
syntax error
; mbogo
mbogo not found
I want it to print "rc: syntax error" (or better yet, "syntax error
near ')'"). In general, the UNIX custom for these things is that the
basename of argv[0] should be printed before the error. (Unless it's
set to '-rc' for a login shell, in which case we should change it to
'rc'.)
I note that bash handles segfaults as a special case, and just prints
"Segmentation fault". I'd be more inclined to go for consistency and
use "rc: segmentation fault". But might that cause people to think rc
was segfaulting? Perhaps, "rc: segmentation fault in child proccess
1234". How's that?
I'll volunteer to do the work for this, as long as Tim thinks it's a
good idea.
--
Decklin
Written with Debian GNU/Linux - http://www.debian.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* rc error messages from scripts
@ 1999-12-08 15:09 Bengt Kleberg
1999-12-09 7:37 ` Decklin Foster
0 siblings, 1 reply; 5+ messages in thread
From: Bengt Kleberg @ 1999-12-08 15:09 UTC (permalink / raw)
To: rc
Greeitngs,
When developing scripts I sometimes get the error message:
line 25: syntax error near '('
Would it be possible to change this? Or is somebody using this information,
and depending upon the layout?
What I would like is
scriptname:25 <and basically anything, say syntax error near '('
The reason for me asking is that I use wily, and wily will automagically
open the file on the right line if the error message looks like the new, suggested format.
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1999-12-10 8:35 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-12-10 7:40 rc error messages from scripts Byron Rakitzis
[not found] <199912090829.AAA23488@peanut.rakitzis.com>
1999-12-09 13:59 ` Decklin Foster
-- strict thread matches above, loose matches on Subject: below --
1999-12-09 8:10 Byron Rakitzis
1999-12-08 15:09 Bengt Kleberg
1999-12-09 7:37 ` Decklin Foster
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).