[Top][All Lists]

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

Re: Is it normal for `bash -s foo` not to make 1=foo available from ~/.b

From: Chet Ramey
Subject: Re: Is it normal for `bash -s foo` not to make 1=foo available from ~/.bashrc?
Date: Tue, 28 Mar 2017 14:52:09 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 3/28/17 1:13 PM, Torka Noda wrote:

> Modifying positional parameters with `set --` isn't supposed to
> modify the shell's behavior live, anyway. The command line is
> already parsed and options already set. So Bash should always
> use the original arguments specified on the command line, to
> pass them to the possible commands fed to its stdin, regardless
> of whether position parameters which could be made available to
> Bash initialization files are modified.

This is not correct.  There is only one set of positional parameters
(putting aside shell functions for a second), and `set' can modify them.
Unless you mean something different that I do not see.

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

reply via email to

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