]> git.ipfire.org Git - thirdparty/coreutils.git/commit
printenv: remove unsupported short options from getopt_long
authorCollin Funk <collin.funk1@gmail.com>
Wed, 27 May 2026 02:39:29 +0000 (19:39 -0700)
committerCollin Funk <collin.funk1@gmail.com>
Wed, 27 May 2026 02:48:52 +0000 (19:48 -0700)
commit255febf98b6b6b98e2871c7305d8f0ec564ba0c4
treebc7d7e5bc517eec02b5d6a2a1a298f57c1ee4dfa
parent22c0191824bcdf93056dca42f8a70312f9074d58
printenv: remove unsupported short options from getopt_long

This patch only improves some error messages. Here is the behavior
before the patch:

    $ printenv -i
    Try 'printenv --help' for more information.
    $ printenv -u
    printenv: option requires an argument -- 'u'
    Try 'printenv --help' for more information.
    $ printenv -u a
    Try 'printenv --help' for more information.

Here is the behavior after:

    $ ./src/printenv -i
    ./src/printenv: invalid option -- 'i'
    Try './src/printenv --help' for more information.
    $ ./src/printenv -u
    ./src/printenv: invalid option -- 'u'
    Try './src/printenv --help' for more information.
    $ ./src/printenv -u a
    ./src/printenv: invalid option -- 'u'
    Try './src/printenv --help' for more information.

* src/printenv.c (main): Remove 'i' and 'u' from the short options given
to getopt_long.
src/printenv.c