Victor Engmark wrote:
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?
command executes the named argument as a command. It is perfectly valid to type in nothing at the command line and expect no error. A similar argument like can be proposed for type. You give it nothing as input, why would you expect output? Conversely, would you want it to give you an error every time you hit 'Enter' at the prompt? it's similar to the annoyance caused by getting an error for unexpected ";" when ";" is meant, in such context, to be taken for a line separator. ;-/