case statements are imho string comparision, nothing to do with aliases On Mon, Mar 29, 2021, 17:23 Chet Ramey <chet.ra...@case.edu> wrote:
> On 3/19/21 10:59 AM, Oğuz wrote: > > > Not much related, but isn't this supposed to work? > > > > $ cat foo.sh > > alias c='case ' w='foo ' i='in ' p=') ' e='esac' u='uname ' s='; ' > > c w i e > > Bash is pretty careful not to perform alias expansion in case statement > pattern lists, even to the point where that overrides the 'alias expand > the next word because the previous expansion ended with a space' > semantics. > > I could flip that, I suppose, even if the `use case' is this hypothetical > example. > > -- > ``The lyf so short, the craft so long to lerne.'' - Chaucer > ``Ars longa, vita brevis'' - Hippocrates > Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/ >