Re: [patch] Minor documentation tweak in ksh(1)

2019-11-26 Thread Jason McIntyre
On Sun, Nov 24, 2019 at 06:26:25PM +, Jason McIntyre wrote:
> > 
> > --- /usr/src/bin/ksh/ksh.1  Sat Oct  5 11:03:46 2019
> > +++ /tmp/ksh.1  Sun Nov 24 05:29:03 2019
> > @@ -1341,7 +1341,7 @@
> >  .Ev CDPATH
> >  is set and does not contain
> >  .Sq \&.
> > -or contains an empty path, the current directory is not searched.
> > +or an empty path, the current directory is not searched.
> 
> 
> hmm. this sentence is horrible, i admit. there are too many negatives.
> i think your change is correct though.
> 
> >  Also, the
> >  .Ic cd
> >  built-in command will display the resulting directory when a match is found
> > @@ -2866,7 +2866,9 @@
> >  .Ar dir .
> >  A
> >  .Dv NULL
> > -path means the current directory.
> > +path or
> > +.Ql .\&
> > +means the current directory.
> 
> i think this is correct too.
> 
> >  If
> >  .Ar dir
> >  is found in any component of the
> > 
> 
> any (developer) oks for this?
> 
> jmc

ok, i committed your changes. thanks for the mail,
jmc



Re: [patch] Minor documentation tweak in ksh(1)

2019-11-24 Thread Jason McIntyre
On Sun, Nov 24, 2019 at 03:36:08AM +, cho...@jtan.com wrote:
> The description of ksh(1)'s handling of CDPATH is not quite complete
> and, worse, contradictory in the two locations it's mentioned. sh(1)
> barely touches on it but is Not Wrong so I've left it alone.
> 

hi.

this is what posix says:

A colon-separated list of pathnames that refer to directories.
The cd utility shall use this list in its attempt to change the
directory, as described in the DESCRIPTION. An empty string in
place of a directory pathname represents the current directory.
If CDPATH is not set, it shall be treated as if it were an empty
string.

in my (admittedly biased) opinion, sh(1) accurately describes this,
rather than "barely touches on it":

Colon separated list of directories used by the cd command. If
unset or empty, the current working directory is used.

> (FWIW I also checked the CDPATH scanning code and actually poked
> at a real shell so I've confirmed that this is how it actually works)
> 
> Matthew
> 
> --- /usr/src/bin/ksh/ksh.1  Sat Oct  5 11:03:46 2019
> +++ /tmp/ksh.1  Sun Nov 24 05:29:03 2019
> @@ -1341,7 +1341,7 @@
>  .Ev CDPATH
>  is set and does not contain
>  .Sq \&.
> -or contains an empty path, the current directory is not searched.
> +or an empty path, the current directory is not searched.


hmm. this sentence is horrible, i admit. there are too many negatives.
i think your change is correct though.

>  Also, the
>  .Ic cd
>  built-in command will display the resulting directory when a match is found
> @@ -2866,7 +2866,9 @@
>  .Ar dir .
>  A
>  .Dv NULL
> -path means the current directory.
> +path or
> +.Ql .\&
> +means the current directory.

i think this is correct too.

>  If
>  .Ar dir
>  is found in any component of the
> 

any (developer) oks for this?

jmc



[patch] Minor documentation tweak in ksh(1)

2019-11-23 Thread chohag
The description of ksh(1)'s handling of CDPATH is not quite complete
and, worse, contradictory in the two locations it's mentioned. sh(1)
barely touches on it but is Not Wrong so I've left it alone.

(FWIW I also checked the CDPATH scanning code and actually poked
at a real shell so I've confirmed that this is how it actually works)

Matthew

--- /usr/src/bin/ksh/ksh.1  Sat Oct  5 11:03:46 2019
+++ /tmp/ksh.1  Sun Nov 24 05:29:03 2019
@@ -1341,7 +1341,7 @@
 .Ev CDPATH
 is set and does not contain
 .Sq \&.
-or contains an empty path, the current directory is not searched.
+or an empty path, the current directory is not searched.
 Also, the
 .Ic cd
 built-in command will display the resulting directory when a match is found
@@ -2866,7 +2866,9 @@
 .Ar dir .
 A
 .Dv NULL
-path means the current directory.
+path or
+.Ql .\&
+means the current directory.
 If
 .Ar dir
 is found in any component of the