bug-bash
[Top][All Lists]
Advanced

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

Re: shopt help possibly wrong


From: Chet Ramey
Subject: Re: shopt help possibly wrong
Date: Fri, 27 Jul 2018 10:19:13 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 7/27/18 7:00 AM, Hugo Gabriel Eyherabide wrote:

> Bash Version: 4.3
> Patch Level: 48
> Release Status: release
> 
> Description:
>         After reading the documentation in "help shopt" I attempted to set
> flags, for example, noclobber, by using "shopt -s noclobber", but got an
> error message. I've found that I can do that by using "shopt -s -o
> -noclobber" but that the help provided me no indication that the additional
> "-o" was actually necessary.
> 
> Repeat-By:
>         Using "shopt -s noclobber" (or any optname) instead of "shopt -s -o
> noclobber).

There is a set of option names for use by `set -o' (mostly the ones
corresponding to `set' options and those defined by POSIX) and a bash-
specific set available for use with `shopt'. Read the documentation to
tell the difference.

> 
> Fix:
>         I would suggest to change the help of shopt so that it says [-o
> [optname ...] ] instead of [-o] [optname ...], and change the help where
> relevant.

That would be wrong.

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



reply via email to

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