bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: --help now warns about built-in conflicts


From: Jim Meyering
Subject: FYI: --help now warns about built-in conflicts
Date: Tue, 05 Apr 2005 00:32:42 +0200

FYI,
Before, 3 man pages (echo, printf, pwd) included a warning like this:

  NOTE: your shell may have its own version of printf, which usually supersedes
  the version described here.  Please refer to your shell's documentation
  for details about the options it supports.

I've put that warning in the --help output of 7 commands (actually,
it's 8.5 if you count `[' and `false'), so it will now appear
automatically in the generated man/*.1 files.  If anyone knows of any
other coreutils commands that are built-in, please let me know.
I noticed only recently that some versions of zsh provide a
builtin-like `stat' module.

I've just done this:

        * src/echo.c (usage): Mention that some shells provide a
        built-in function by the same name.
        * src/kill.c (usage): Likewise
        * src/printf.c (usage): Likewise.
        * src/pwd.c (usage): Likewise.
        * src/stat.c (usage): Likewise.
        * src/test.c (usage): Likewise.
        * src/true.c (usage):
        * src/system.h (USAGE_BUILTIN_WARNING): New macro.

        * man/echo.x: Remove `DESCRIPTION' section, now that --help includes it.
        * man/printf.x: Likewise.
        * man/pwd.x: Likewise.

Initially, I added those three lines at the very top (between the Usage line(s)
and the short description), since mistaking the man-page as a reference
for the built-in is such a common problem.  But I didn't like that.
Now it's at the end, e.g.:

  Usage: ./echo [OPTION]... [STRING]...
  Echo the STRING(s) to standard output.

    -n             do not output the trailing newline
    -e             enable interpretation of backslash escapes
    -E             disable interpretation of backslash escapes (default)
        --help     display this help and exit
        --version  output version information and exit

  If -e is in effect, the following sequences are recognized:

    \0NNN   the character whose ASCII code is NNN (octal)
    \\     backslash
    \a     alert (BEL)
    \b     backspace
    \c     suppress trailing newline
    \f     form feed
    \n     new line
    \r     carriage return
    \t     horizontal tab
    \v     vertical tab

  NOTE: your shell may have its own version of echo, which usually supersedes
  the version described here.  Please refer to your shell's documentation
  for details about the options it supports.

  Report bugs to <address@hidden>.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]