Re: ksh.1: two typos

2017-08-19 Thread Jason McIntyre
On Fri, Aug 18, 2017 at 05:32:21PM -0500, Scott Cheloha wrote:
> > On Aug 18, 2017, at 1:18 AM, Jason McIntyre  wrote:
> > 
> > [...]
> > 
> >> --
> >> Scott Cheloha
> >> 
> >> Index: bin/ksh/ksh.1
> >> ===
> >> RCS file: /cvs/src/bin/ksh/ksh.1,v
> >> retrieving revision 1.192
> >> diff -u -p -r1.192 ksh.1
> >> --- bin/ksh/ksh.1  11 Aug 2017 23:10:55 -  1.192
> >> +++ bin/ksh/ksh.1  18 Aug 2017 00:19:35 -
> >> @@ -1614,16 +1614,15 @@ in
> >> .Ev PS1 .
> >> .It Li \e#
> >> The current command number.
> >> -This could be different to the current history number,
> >> -if
> >> +This may differ from the current history number if
> > 
> > what's there now is ok, and what you propose is ok. so the difference is
> > really taste. in cases like that, i don;t think changing the text is
> > worth it, unless you can see a clear improvement.
> > 
> > as to your point about to -> from, "different to" is in use. my
> > student dictonary notes that "In British English, people sometimes say
> > that one thing is different to another. Some people consider this use to
> > be incorrect". but then the reverse is seemingly true of "different
> > than".
> > 
> > i would just leave it.
> 
> Alrighty.
> 
> >> .Ev HISTFILE
> >> contains a history list from a previous session.
> >> .It Li \e$
> >> -The default prompt i.e.\&
> >> -.Sq # \&
> >> +The default prompt character i.e.\&
> >> +.Sq #\&
> >> if the effective UID is 0,
> >> otherwise
> >> -.Sq $ \& .
> >> +.Sq $\& .
> >> Since the shell interprets
> >> .Sq $
> >> as a special character within double quotes,
> >> 
> > 
> > i haven;t tested the space issue, but if it's correct i guess it needs
> > fixing. however in that case the "\&" escaping is not needed.
> 
> 
> Here's a tweaked diff:
> 

committed, thanks.
jmc

> Index: bin/ksh/ksh.1
> ===
> RCS file: /cvs/src/bin/ksh/ksh.1,v
> retrieving revision 1.192
> diff -u -p -r1.192 ksh.1
> --- bin/ksh/ksh.1 11 Aug 2017 23:10:55 -  1.192
> +++ bin/ksh/ksh.1 18 Aug 2017 22:31:13 -
> @@ -1619,11 +1619,11 @@ if
>  .Ev HISTFILE
>  contains a history list from a previous session.
>  .It Li \e$
> -The default prompt i.e.\&
> -.Sq # \&
> +The default prompt character i.e.\&
> +.Sq #
>  if the effective UID is 0,
>  otherwise
> -.Sq $ \& .
> +.Sq $ .
>  Since the shell interprets
>  .Sq $
>  as a special character within double quotes,
> 



Re: ksh.1: two typos

2017-08-18 Thread Scott Cheloha
> On Aug 18, 2017, at 1:18 AM, Jason McIntyre  wrote:
> 
> [...]
> 
>> --
>> Scott Cheloha
>> 
>> Index: bin/ksh/ksh.1
>> ===
>> RCS file: /cvs/src/bin/ksh/ksh.1,v
>> retrieving revision 1.192
>> diff -u -p -r1.192 ksh.1
>> --- bin/ksh/ksh.111 Aug 2017 23:10:55 -  1.192
>> +++ bin/ksh/ksh.118 Aug 2017 00:19:35 -
>> @@ -1614,16 +1614,15 @@ in
>> .Ev PS1 .
>> .It Li \e#
>> The current command number.
>> -This could be different to the current history number,
>> -if
>> +This may differ from the current history number if
> 
> what's there now is ok, and what you propose is ok. so the difference is
> really taste. in cases like that, i don;t think changing the text is
> worth it, unless you can see a clear improvement.
> 
> as to your point about to -> from, "different to" is in use. my
> student dictonary notes that "In British English, people sometimes say
> that one thing is different to another. Some people consider this use to
> be incorrect". but then the reverse is seemingly true of "different
> than".
> 
> i would just leave it.

Alrighty.

>> .Ev HISTFILE
>> contains a history list from a previous session.
>> .It Li \e$
>> -The default prompt i.e.\&
>> -.Sq # \&
>> +The default prompt character i.e.\&
>> +.Sq #\&
>> if the effective UID is 0,
>> otherwise
>> -.Sq $ \& .
>> +.Sq $\& .
>> Since the shell interprets
>> .Sq $
>> as a special character within double quotes,
>> 
> 
> i haven;t tested the space issue, but if it's correct i guess it needs
> fixing. however in that case the "\&" escaping is not needed.


Here's a tweaked diff:

Index: bin/ksh/ksh.1
===
RCS file: /cvs/src/bin/ksh/ksh.1,v
retrieving revision 1.192
diff -u -p -r1.192 ksh.1
--- bin/ksh/ksh.1   11 Aug 2017 23:10:55 -  1.192
+++ bin/ksh/ksh.1   18 Aug 2017 22:31:13 -
@@ -1619,11 +1619,11 @@ if
 .Ev HISTFILE
 contains a history list from a previous session.
 .It Li \e$
-The default prompt i.e.\&
-.Sq # \&
+The default prompt character i.e.\&
+.Sq #
 if the effective UID is 0,
 otherwise
-.Sq $ \& .
+.Sq $ .
 Since the shell interprets
 .Sq $
 as a special character within double quotes,



Re: ksh.1: two typos

2017-08-17 Thread Scott Cheloha
> On Aug 17, 2017, at 7:52 PM, Scott Cheloha  wrote:
> 
>> On Aug 17, 2017, at 7:47 PM, Theo Buehler  wrote:
>> 
>> On Fri, Aug 18, 2017 at 02:37:51AM +0200, Theo Buehler wrote:
>>> On Thu, Aug 17, 2017 at 07:25:14PM -0500, Scott Cheloha wrote:
 Spotted these when customizing my prompt.
 
 I think "may differ from" is better than "could be different from,"
 and you're free to (heh) differ, but in either case we get the
 
to -> from
>>> 
>>> I leave the first one one for jmc to decide, but I prefer the original
>>> wording about the prompt: PS1 *is* either '$ ' or '# ' by default.
>>> 
>>> See the lines following bin/ksh/main.c:312.
>>> 
>> 
>> Please ignore this. I looked at the wrong part of the man page.
>> 
>> The patch is ok tb if jmc doesn't object.
> 
> Just so everyone is clear, and for posterity, the second typo is
> that the escape sequence \$ does *not* produce a space character
> after the prompt character.  It only prints '$', or '#' if you
> are root.
> 
> Probably should have written that out explicitly.
> 
> -Scott

And by tech@ I meant to send that to bugs@.

Oh well.



Re: ksh.1: two typos

2017-08-17 Thread Theo Buehler
On Fri, Aug 18, 2017 at 02:37:51AM +0200, Theo Buehler wrote:
> On Thu, Aug 17, 2017 at 07:25:14PM -0500, Scott Cheloha wrote:
> > Spotted these when customizing my prompt.
> > 
> > I think "may differ from" is better than "could be different from,"
> > and you're free to (heh) differ, but in either case we get the
> > 
> > to -> from
> 
> I leave the first one one for jmc to decide, but I prefer the original
> wording about the prompt: PS1 *is* either '$ ' or '# ' by default.
> 
> See the lines following bin/ksh/main.c:312.
> 

Please ignore this. I looked at the wrong part of the man page.

The patch is ok tb if jmc doesn't object.



Re: ksh.1: two typos

2017-08-17 Thread Theo Buehler
On Thu, Aug 17, 2017 at 07:25:14PM -0500, Scott Cheloha wrote:
> Spotted these when customizing my prompt.
> 
> I think "may differ from" is better than "could be different from,"
> and you're free to (heh) differ, but in either case we get the
> 
>   to -> from

I leave the first one one for jmc to decide, but I prefer the original
wording about the prompt: PS1 *is* either '$ ' or '# ' by default.

See the lines following bin/ksh/main.c:312.



ksh.1: two typos

2017-08-17 Thread Scott Cheloha
Spotted these when customizing my prompt.

I think "may differ from" is better than "could be different from,"
and you're free to (heh) differ, but in either case we get the

to -> from

--
Scott Cheloha

Index: bin/ksh/ksh.1
===
RCS file: /cvs/src/bin/ksh/ksh.1,v
retrieving revision 1.192
diff -u -p -r1.192 ksh.1
--- bin/ksh/ksh.1   11 Aug 2017 23:10:55 -  1.192
+++ bin/ksh/ksh.1   18 Aug 2017 00:19:35 -
@@ -1614,16 +1614,15 @@ in
 .Ev PS1 .
 .It Li \e#
 The current command number.
-This could be different to the current history number,
-if
+This may differ from the current history number if
 .Ev HISTFILE
 contains a history list from a previous session.
 .It Li \e$
-The default prompt i.e.\&
-.Sq # \&
+The default prompt character i.e.\&
+.Sq #\&
 if the effective UID is 0,
 otherwise
-.Sq $ \& .
+.Sq $\& .
 Since the shell interprets
 .Sq $
 as a special character within double quotes,