Warning: Work in progress! Leave feedback on Zulip or Github if you'd like this doc to be updated.

Ideas for Future Deprecations

These are some ideas, extracted from Shell Language Deprecations.

These breakages may never happen, as they require a significant new lexer mode. If they do, you will want to avoid the following syntax:

I expect that those sequences are rare, so this change would break few programs.

Table of Contents
First Class File Descriptors (parse_amp)
Inline Eggex

First Class File Descriptors (parse_amp)

We want to make redirection simpler and more consistent. We can remove the confusing <& and >& operators, and instead use > and < with descriptors.

Remains the same:

echo foo >file
read :var <file


echo foo >& 2
read var <& 0


echo foo > &2         # descriptor with &
read :var < &0

echo foo > &stderr    # named descriptor
read :var < &stdin


echo foo 1>& 2


echo foo &1 > &2

(Note: the syntax {fd}> file.txt will be replaced by the open builtin.)


Inline Eggex

Instead of:

var pat = / digit+ /
egrep $pat *.txt

You can imagine:

egrep $/ digit+ / *.txt

Minor breakage: making $/ significant.

Note: this is probably possible with shopt --set strict_dollar.

Generated on Thu Sep 16 14:18:46 EDT 2021