Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

PROMPT2

On Fri, 10 Jun 2011 11:40:01 -0400, vefatica <> wrote:

|I can't get PROMPT2 to work.

It only works in some situations.

Code:
v:\> set prompt2
$g$s

v:\> echo foo &^

[quote]> echo bar
[/quote]
foo
bar

v:\> (echo foo
More? echo bar
More? )
foo
bar

v:\> do i=1 to 2 (
More? echo foo )
foo
foo
 
On Fri, 10 Jun 2011 12:49:03 -0400, rconn <> wrote:

|---Quote---
|> |I can't get PROMPT2 to work.
|>
|> It only works in some situations.
|---End Quote---
|As the help says, PROMPT2 is only used when the last character on the line
|is an escape character. Your unclosed command groups do not have a trailing
|escape character.

It would be nice if it simply replaced the "More?" prompt.
 
As the help says, PROMPT2 is only used when the last character on the line
is an escape character. Your unclosed command groups do not have a trailing
escape character.
It doesn't say that it is only used when escape is the last character. It says...
PROMPT2 defines the prompt used for line continuations
... and then gives an example of the the last character being the escape...
(i.e., when the last character on a line is an escape character. The default is "More? ".
 
Obnoxiously trivial grammar nit; feel free to tune out:

i.e. = "that is"
e.g. = "for example"

So the parenthetical bit is defining the phrase "line continuations", not giving an example. (It is missing a close pat, though.)
 
To be fair, I.E. means "in other words."
E.G. means "for example"

-Scott




Quote:


Originally Posted by rconn

As the help says, PROMPT2 is only used
when the last character on the line
is an escape character. Your unclosed command groups do not have a trailing
escape character.
It doesn't say that it is only used when
escape is the last character. It says...
Quote:


PROMPT2 defines the prompt used
for line continuations
... and then gives an example of the the
last character being the escape...
Quote:


(i.e., when the last character
on a line is an escape character. The default is "More? ".
 
On Fri, 10 Jun 2011 16:16:40 -0400, rconn <> wrote:

|I think you're trying to redefine the meaning of "i.e." to be the same as "e.g.". The last character being an escape is not an example, it's a requirement.

In effect the two (escaped newline and unresolved parens) are the same ...
command input continues on a sebsequent line with a different prompt to remind
the user of what's going on. Would it be difficult to make the behavior
consistent?
 
> In effect the two (escaped newline and unresolved parens) are the
> same ... command input continues on a sebsequent line with a
> different prompt to remind the user of what's going on. Would it be
> difficult to make the behavior consistent?

It may appear the same to you, but to the parser they're about as similar as
a fish and a banana.

I'll look at it again, but it is not trivial.
 
On Fri, 10 Jun 2011 17:26:02 -0400, rconn <> wrote:

|---Quote---
|> In effect the two (escaped newline and unresolved parens) are the
|> same ... command input continues on a sebsequent line with a
|> different prompt to remind the user of what's going on. Would it be
|> difficult to make the behavior consistent?
|---End Quote---
|It may appear the same to you, but to the parser they're about as similar as
|a fish and a banana.
|
|I'll look at it again, but it is not trivial.

The actual writing of the string is all that would seem to matter. The escaped
newline (apparently) causes ShowPrompt(L"PROMPT2"); I'm not sure what the
unresolved paren causes to happen.
 
To be fair, I.E. means "in other words."
{Start GrammarNazi mode}
Being anally retentive, Charles is perfectly correct in defining i.e. as 'that is', which is the literal translation of the Latin 'id est' from which the abbreviation derives. It always bugs me when folk use i.e. and e.g. interchangeably and here we seem to have fallen foul of the opposite, i.e. assuming that the help was giving an example rather than defining the only valid situation, despite the text actually being to the contrary. This is why this stuff does matter, even in the age of the text and the tweet, because when someone uses a term properly we have a knee-jerk reaction that they've actually done so incorrectly.
{End GrammarNazi mode}
 
It may appear the same to you, but to the parser they're about as similar as
a fish and a banana.

I'll look at it again, but it is not trivial.

I see you did it. Thanks! Was it hard?
 
Back
Top