help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Chain/cascade assignment


From: konsolebox
Subject: Re: [Help-bash] Chain/cascade assignment
Date: Mon, 22 Feb 2016 16:54:48 +0800

On Mon, Feb 22, 2016 at 4:35 AM, Илюшкин Никита <address@hidden> wrote:
> search results and simple test in CLI show, that there is no chain
> assignment in bash like var=var=val. I wonder why and want to propose this
> as a feature (as far this assign construction seems common in other
> languages).

Because it would lead to confusion. The shell is an interpreting
program that most of the time doesn't require literal strings to be
quoted. How would you know if the user means to have the second '=' as
a semantic figure, and not a literal value? Would you mean that we
force use of quotes instead, like var=var="val"?

Bash also tries to maintain itself being a shell, and no shell would
have that behavior or feature, so it's unlikely to have it changed or
added.

Other people would also comment here that it's awful to look at.

Note: Some parts may be subject to expansion, and quoting may be
helpful at times, but that's another thing to discuss.

-- 
konsolebox



reply via email to

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