GNU bug report logs - #43541
minor bug in GNU coreutils 8.30: pwd --version doesn't work

Previous Next

Package: coreutils;

Reported by: Nikolay <tselnv <at> gmail.com>

Date: Sun, 20 Sep 2020 22:39:02 UTC

Severity: normal

Tags: notabug

Done: Bob Proulx <bob <at> proulx.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 43541 in the body.
You can then email your comments to 43541 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#43541; Package coreutils. (Sun, 20 Sep 2020 22:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Nikolay <tselnv <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Sun, 20 Sep 2020 22:39:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Nikolay <tselnv <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: minor bug in GNU coreutils 8.30: pwd --version doesn't work
Date: Sun, 20 Sep 2020 23:49:25 +0300
[Message part 1 (text/plain, inline)]
GNU coreutils 8.30

$ pwd --version
bash: pwd: --: invalid option
pwd: usage: pwd [-LP]


$ man pwd

...

--version
              output version information and exit


[Screenshot.png (image/png, attachment)]

Information forwarded to bug-coreutils <at> gnu.org:
bug#43541; Package coreutils. (Sun, 20 Sep 2020 22:50:02 GMT) Full text and rfc822 format available.

Message #8 received at 43541 <at> debbugs.gnu.org (full text, mbox):

From: Bob Proulx <bob <at> proulx.com>
To: Nikolay <tselnv <at> gmail.com>
Cc: 43541 <at> debbugs.gnu.org
Subject: Re: bug#43541: minor bug in GNU coreutils 8.30: pwd --version
 doesn't work
Date: Sun, 20 Sep 2020 16:49:46 -0600
tag 43541 + notabug
close 43541
thanks

Nikolay wrote:
> GNU coreutils 8.30

Coreutils version 8.30.  Gotcha.

> $ pwd --version
> bash: pwd: --: invalid option
> pwd: usage: pwd [-LP]

But that is not the GNU Coreutils pwd program.  That is the shell
builtin pwd.  In this case it is bash.  And bash does not document
either a --version or --help option.

    $ type pwd
    pwd is a shell builtin

    $ help pwd
    pwd: pwd [-LP]
        Print the name of the current working directory.
        
        Options:
          -L        print the value of $PWD if it names the current working
                    directory
          -P        print the physical directory, without any symbolic links
        
        By default, `pwd' behaves as if `-L' were specified.
        
        Exit Status:
        Returns 0 unless an invalid option is given or the current directory
        cannot be read.

Since this isn't a coreutils program I am going to attend to the
housekeeping and close the bug ticket.  But please let's continue
discussion here for additional questions or comments.

This is actually an FAQ.

    https://www.gnu.org/software/coreutils/faq/coreutils-faq.html#I-am-having-a-problem-with-kill-nice-pwd-sleep-or-test_002e


> $ man pwd
> 
> ...
> 
> --version
>               output version information and exit

That is the man page for Coreutils pwd.  And if you want to use the
external command then you must avoid the builtin.

    $ type -a pwd
    pwd is a shell builtin
    pwd is /bin/pwd

    $ env pwd --version
    pwd (GNU coreutils) 8.32

Use of 'env' in this way forces searching PATH for the named program
regardless of shell and avoids builtins.

Hope this helps! :-)

Bob




Added tag(s) notabug. Request was from Bob Proulx <bob <at> proulx.com> to control <at> debbugs.gnu.org. (Sun, 20 Sep 2020 22:50:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 43541 <at> debbugs.gnu.org and Nikolay <tselnv <at> gmail.com> Request was from Bob Proulx <bob <at> proulx.com> to control <at> debbugs.gnu.org. (Sun, 20 Sep 2020 22:50:03 GMT) Full text and rfc822 format available.

Information forwarded to bug-coreutils <at> gnu.org:
bug#43541; Package coreutils. (Mon, 21 Sep 2020 05:42:02 GMT) Full text and rfc822 format available.

Message #15 received at 43541 <at> debbugs.gnu.org (full text, mbox):

From: Chris Elvidge <celvidge001 <at> gmail.com>
To: Nikolay <tselnv <at> gmail.com>, 43541 <at> debbugs.gnu.org
Subject: Re: bug#43541: minor bug in GNU coreutils 8.30: pwd --version doesn't
 work
Date: Mon, 21 Sep 2020 00:11:45 +0100
On 20/09/2020 09:49 pm, Nikolay wrote:
> GNU coreutils 8.30
> 
> $ pwd --version
> bash: pwd: --: invalid option
> pwd: usage: pwd [-LP]
> 
> 
> $ man pwd
> 
> ...
> 
> --version
>                output version information and exit
> 
> 

Try: /bin/pwd --version
And: help pwd

Is there a difference?

-- 

Chris Elvidge





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 19 Oct 2020 11:24:06 GMT) Full text and rfc822 format available.

This bug report was last modified 3 years and 190 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.