GNU bug report logs -
#12589
doc: dirname: manpage partially wrong/confusing
Previous Next
To reply to this bug, email your comments to 12589 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-coreutils <at> gnu.org
:
bug#12589
; Package
coreutils
.
(Sat, 06 Oct 2012 21:32:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Filipus Klutiero <chealer <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-coreutils <at> gnu.org
.
(Sat, 06 Oct 2012 21:32:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This report follows a previous report about dirname's info page and
manpage: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6175
dirname's info page is now IMO correct and quite clear in its
description of dirname's behavior:
> `dirname' prints all but the final slash-delimited component of NAME.
> Slashes on either side of the final component are also removed. If the
> string contains no slash, `dirname' prints `.' (meaning the current
> directory).
However, the manpage is still confusing. It used to read:
> Print NAME with its trailing /component removed; if NAME contains no
> /'s, output `.' (meaning the current directory).
It now reads:
> Output NAME with its last non-slash component and trailing slashes removed; if NAME contains no /'s, output `.' (meaning the current directory).
First, it's unclear what kind of component this refers to. A slash is
not a pathname component, therefore "non-slash component" would seem
equivalent to simply "component". If one understands "component" as
pathname component, then the description becomes equivalent for the
typical case of "/foo/bar" to:
> Output "/foo/bar" with its last component and trailing slashes removed.
That would, in my understanding, mean outputting "/foo/" (there are no
trailing slashes in "/foo/bar"). But dirname would actually output
"/foo", removing the last slash in the result.
I would recommend adopting the same description as the one used in the
info page.
By the way, the short description reads:
> strip last component from file name
In POSIX terminology, this sounds like "take a filename, output
nothing". "from a pathname" would make more sense.
Severity set to 'wishlist' from 'normal'
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 06 Nov 2018 18:05:01 GMT)
Full text and
rfc822 format available.
Changed bug title to 'doc: dirname: manpage partially wrong/confusing' from 'dirname manpage partially wrong/confusing'
Request was from
Assaf Gordon <assafgordon <at> gmail.com>
to
control <at> debbugs.gnu.org
.
(Tue, 06 Nov 2018 18:05:01 GMT)
Full text and
rfc822 format available.
This bug report was last modified 6 years and 312 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.