bug-bash
[Top][All Lists]
Advanced

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

Re: Why are parameters to Bash's builtin optional?


From: Chet Ramey
Subject: Re: Why are parameters to Bash's builtin optional?
Date: Wed, 18 Apr 2012 10:36:36 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:10.0.2) Gecko/20120216 Thunderbird/10.0.2

On 4/18/12 9:18 AM, Victor Engmark wrote:
> (Re-posted from Stack Overflow 
> <http://unix.stackexchange.com/questions/36751/why-are-parameters-to-bashs-builtin-optional>)
> 
> Running simply `builtin` prints nothing and returns exit code 0. This is in 
> accordance with `help builtin`, which shows all parameters as optional. But 
> why isn't this no-op an error? Is there a use case for this? A more useful 
> result would be an error code or, even better, listing the currently 
> available builtins.

What's the use case for having it be an error?  I can see printing a list
of builtins, though `enable' already does that.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet@case.edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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