On 8/19/17 8:30 PM, L A Walsh wrote: > Curious, but how difficult or problematic would it be > to allow using brace-expansion (ex. {f,x} ) as a short-hand > to test/combine file-op tests like: > > Allowing: > > test -{f,x} /bin/ls && ... > or > if [[ -{f,x} $file ]]; then ... ; fi > > instead of: > > test -f /bin/ls && test -x /bin/ls && ...
In addition to changing the established meaning of brace expansion, this would require that brace expansion understand the command word (test, primarily) and change accordingly, and create an incompatibility between the shell's builtin test and a test binary. That incompatibility would be almost impossible to resolve. If you want a new operator as syntactic sugar for composing expressions, it would be better that it not resemble existing features. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/