On Tue, Jun 21, 2011 at 10:28:03PM +0200, Jilles Tjoelker wrote:
> On Tue, Jun 21, 2011 at 07:34:57PM +0000, Ruslan Ermilov wrote:
> > Author: ru
> > Date: Tue Jun 21 19:34:57 2011
> > New Revision: 223372
> > URL: http://svn.freebsd.org/changeset/base/223372
> 
> > Log:
> >   Make ``realpath'' behave like ``realpath .''.
> 
> Is this being added for compatibility with something?
> 
> If not, why do we need this non-standard extension if the shorter and
> standard pwd -P already fulfills this function?

I treat it as a convenient addition to a non-standard utility.

realpath(1) was first added in FreeBSD in year 2000 by phk@,
as a convenience utility.  In r90523 the ability to call
"realpath" without arguments (with a similar behavior but
different implementation) was added by mike@.  Ten months
later, this syntax was removed by johan@ in r108034.

I'm not aware of any standard and/or another non-FreeBSD based
OS that also have this utility (only saw a mention of a patch
that adds an utility of the same name into GNU shell-utils,
but it seems to have never happened).  We could emphasize this:

Index: realpath.1
===================================================================
--- realpath.1  (revision 223372)
+++ realpath.1  (working copy)
@@ -69,6 +69,10 @@
 fails.
 .Sh EXIT STATUS
 .Ex -std
+.Sh COMPATIBILITY
+The
+.Nm
+utility is non-standard and should not be used in portable scripts.
 .Sh SEE ALSO
 .Xr realpath 3
 .Sh HISTORY


Cheers,
-- 
Ruslan Ermilov
r...@freebsd.org
FreeBSD committer
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to