misc/77259: shell command "command -v cmd" doesn't work

Bram Moolenaar bram at vim.org
Tue Feb 8 03:10:22 PST 2005


>Number:         77259
>Category:       misc
>Synopsis:       shell command "command -v cmd" doesn't work
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Feb 08 11:10:21 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Bram Moolenaar
>Release:        5.3
>Organization:
Vim
>Environment:
FreeBSD masaka.moolenaar.net 5.3-RELEASE FreeBSD 5.3-RELEASE #11: Mon Jan 24 22:35:11 CET 2005     mool at masaka.moolenaar.net:/usr/src/sys/i386/compile/MASAKA  i386

>Description:
In a "sh" shell the "command" command doesn't accept the "-v" argument.  This breaks shell scripts that were written for a POSIX shell.
This is more lack of a feature than a real bug, but since the shell scripts work fine otherwise, fixing this problem will help people trying to run the POSIX test suite on FreeBSD.
>How-To-Repeat:
% /bin/sh
$ command -v ls
command: unknown option: -v
$
>Fix:
Should modify commandcmd() in /usr/src/bin/sh/eval.c.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list