help-bash
[Top][All Lists]
Advanced

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

Re: Do `>& -` and `<& -` also work?


From: Chet Ramey
Subject: Re: Do `>& -` and `<& -` also work?
Date: Wed, 12 May 2021 09:59:19 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.10.1

On 5/11/21 12:06 AM, Peng Yu wrote:
On 5/10/21, Chet Ramey <chet.ramey@case.edu> wrote:
On 5/10/21 3:17 PM, Peng Yu wrote:

If verbosity was not an issue, then neither &> nor >& should be
introduced in the first place.

Since they were introduced, they could be made better to be not
verbose in the cases that I mentioned.

You're trying to relitigate 40-year-old decisions. That is, among other
things, not productive.

I totally understand what you are saying. But there are
POSIX-noncompliant shells that are also very popular.

This is not a popularity contest. Different projects have different goals.

In
this sense, completely POSIX-compliance is not that important.

You mean in the sense of goals that are associated with some other project,
not this one.


https://www.slant.co/versus/1601/1602/~bash_vs_fish

I checked the syntax of fish, which seems to be too far away from the
bash syntax. I'd rather have something similar to bash but fixing the
bad designs over the last 40 years.

You would not be the first to try. csh started as an attempt to improve
the interactive parts of the Mashey shell. rc was Tom Duff's experiment
in "tinkering" with the sh syntax. zsh and fish, in their way, are the
result of the same phenomenon. The differences between these shells show
that "bad design" is a subjective thing.

 For this reason, it would
beneficial to evaluate what syntax designs are good and what designs
are bad in bash (which can come from POSIX).

You'll understand why people are reluctant to help you with your effort,
then. The ROI is only good for you.

If there were somebody
who starts with a better shell similar to bash, that could serve as a
reasonable good starting point.

Very subjective, and it depends on your goals.


For the case of [n]>&word, I doubt most people would add space before
word. The syntax is just too difficult to be fully understood for
beginners,

Indeed, the shell was never intended for beginners. Look at where Bourne
worked; look at his intended users.

I agree that beginners tend to learn a necessary subset of the syntax,
however they do it, and gradually progress from their as their expertise
and needs increase. That's how everyone learns a programming language.


In that sense, if the goal is not to be POSIX compatible, but to have
something as compatible as to existing bash, and getting off those bad
features that most people don't use anyway, it would be helpful to
analyze the existing syntax. I hope that you understand the logic
reasoning here.

Sure, I understand the desire. You want to create some subset that is close
to your ideal, which is, again, thoroughly subjective. But it's a private
goal, and people don't have to help you.


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