Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11821

Re: Bash 4.4 beta - parameter transformation - parameter attributes

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Bash 4.4 beta - parameter transformation - parameter attributes
Date 2015-11-03 09:41 -0500
Message-ID <mailman.1562.1446561683.7904.bug-bash@gnu.org> (permalink)
References <CANaoh6Ke-ZXZzuVXn+S7HwoJoKQqp6d5k_4UzVR_paxxWxP+sA@mail.gmail.com>

Show all headers | View raw


On 11/2/15 7:36 PM, Dennis Williamson wrote:

> I guess the point I'm trying to get to is that I don't see
> how "${colors[*]@a}" or "${colors@A}" are useful whereas their opposites
> are ("${colors@a}" and "${colors[*]@A}") regardless of whether the
> parameter is an array or scalar. By the way, subscripting using "@" with
> these transformations also doesn't seem to be useful.
> 
> It may be that this is not a matter for changing the Bash code or
> documentation but that it's necessary to consider these behaviors when
> making good coding practice choices.

Consistency is important.  All the operators accept the same set of
operands on the lhs, even if some combinations are not really useful.

Chet

-- 
``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/

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Bash 4.4 beta - parameter transformation - parameter attributes Chet Ramey <chet.ramey@case.edu> - 2015-11-03 09:41 -0500

csiph-web