GNU bug report logs -
#6175
dirname manpage and info page partially wrong/misleading
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This report is about 2 separate issues in the dirname documentation. The
info page is much better than the manual page, but says:
> `dirname' prints all but the final slash-delimited component of a
> string (presumably a file name, but also works on directories).
The parenthese is wrong; there is no reason to presume the file given is
a regular file, dirname is equally useful on directories. "presumably"
should perhaps be replaced by "usually", or removed.
The manual page is much more confusing, saying:
> DESCRIPTION
>
>
> Print NAME with its trailing /component removed; if NAME contains no
> /'s, output `.' (meaning the current directory).
dirname is more complex than just removing a trailing slash followed by
a pathname component if that is the ending. For example, it also removes
a slash followed by a pathname component followed by a slash, if that is
how the path terminates. The manual should probably adopt the info
page's formulation, which is more vague, but not wrong.
This bug report was last modified 14 years and 42 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.