bug-bash
[Top][All Lists]
Advanced

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

Shouldn't "type" and "command" complain if there are no parameters?


From: Victor Engmark
Subject: Shouldn't "type" and "command" complain if there are no parameters?
Date: Wed, 18 Apr 2012 06:26:15 -0700 (PDT)
User-agent: G2/1.0

Re-post from 
<http://unix.stackexchange.com/questions/36752/why-are-parameters-to-bashs-command-and-type-optional>:

[T]hese commands print nothing and return exit code 0 if no parameters are 
provided. But [...] `help command` and `help type` both state that at least one 
parameter is mandatory. Is this a bug, a feature, or did I misunderstand 
something?

    $ bash --version
    GNU bash, version 4.2.10(1)-release (x86_64-pc-linux-gnu)
    $ type -a command
    command is a shell builtin
    $ type -a type
    type is a shell builtin
    $ help -s command
    command: command [-pVv] command [arg ...]
    victor@victor:/home/victor/taclom/rails (master *$)
    $ help -s type
    type: type [-afptP] name [name ...]
    $ command
    $ echo $?
    0
    $ type
    $ echo $?
    0


reply via email to

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