bug-bash
[Top][All Lists]
Advanced

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

Re: continued alias problem -- some work, some don't, why?


From: Greg Wooledge
Subject: Re: continued alias problem -- some work, some don't, why?
Date: Tue, 9 Jul 2019 09:21:12 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Jul 08, 2019 at 03:30:47PM -0700, L A Walsh wrote:
> alias my='declare '
> alias Export='-x '
> alias Map='-A '
> alias Int='-i '
> 
> my Export Map Int ffffe=([one]=1)
> -bash: declare: `-x': not a valid identifier
> -bash: declare: `-A': not a valid identifier
> -bash: declare: `-i': not a valid identifier

This is what I get when I run your commands:

wooledg:~$ alias my='declare '
wooledg:~$ alias Export='-x '
wooledg:~$ alias Map='-A '
wooledg:~$ alias Int='-i '
wooledg:~$ my Export Map Int ffffe=([one]=1)
wooledg:~$ set | grep -e Export -e Map -e Int -e ffffe
_=ffffe
ffffe=([one]="1" )
wooledg:~$ declare -p ffffe
declare -Aix ffffe=([one]="1" )

Because the dead horse is still equine-shaped, I will beat upon it some
more: this is utterly horrible coding and you should stop doing it.

I strongly disagree with your decision to do this, but whatever bug you're
seeing, I'm not seeing it.  Not in bash 5.0 or 4.4, anyway, which are
the only two versions I tried.



reply via email to

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