Matthias Klose wrote:

> ------------------------------------------------------------------------
> 
> Subject:
> Bug#292751: "command -v" prints function names
> From:
> Thomas Hood <[EMAIL PROTECTED]>
> Date:
> Sat, 29 Jan 2005 15:00:35 +0100
> To:
> Debian Bug Tracking System <[EMAIL PROTECTED]>
> 
> To:
> Debian Bug Tracking System <[EMAIL PROTECTED]>
> 
> 
> Package: bash
> Version: 3.0-5
> Severity: normal
> 
> The following log shows that "command -v" prints the name of a shell
> function even though the man page says that shell functions are
> supposed to be excluded from the search.

The man page does not say that, though it's not obvious.  Rather than
specify two different builtins, POSIX chose to standardize `command'
with two essentially independent modes.  When used to run a command, it
skips shell function lookup.  When invoked with `-v' or `-V', it behaves
like `type', and shell functions are included.  If you look at the POSIX
description of `-v' and `-V', you'll see that shell functions are
explicitly included.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live Strong.
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to