Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #15090
| Path | csiph.com!goblin2!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail |
|---|---|
| From | L A Walsh <bash@tlinx.org> |
| Newsgroups | gnu.bash.bug |
| Subject | continued alias problem -- some work, some don't, why? |
| Date | Mon, 08 Jul 2019 15:30:47 -0700 |
| Lines | 43 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.526.1562625062.2688.bug-bash@gnu.org> (permalink) |
| References | <5D23C417.5060108@tlinx.org> |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1562625063 30652 209.51.188.17 (8 Jul 2019 22:31:03 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash <bug-bash@gnu.org> |
| Envelope-to | bug-bash@gnu.org |
| User-Agent | Thunderbird |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] |
| X-Received-From | 173.164.175.65 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.23 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <https://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <5D23C417.5060108@tlinx.org> |
| Xref | csiph.com gnu.bash.bug:15090 |
Show key headers only | View raw
I have been trying to use something like a continued alias (space following the expansion). So I have several modifies on a var my -a -i -x foobar=(1 2 3) my -p foobar declare -aix foobar=([0]="1" [1]="2" [2]="3") That's what I am wanting, But trying various aliases, I'm not getting consistent results: With these aliases: 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 But: this does: declare -x -A -i foo7=([one]=1 [two]=2)> my -p foo7 my -p foo7 declare -Aix foo7=([two]="2" [one]="1" ) Part of it appears to be the word Export in a declaration -- will tend to ignore other things, but using the flag -x, will set the flag w/no error. So why do aliases of '-x ' not work where a bare '-x' do?. Annoying is when you get some error trying to create a map, -- then the var will be created as an array, which, if you don't catch it makes future attempt to create a map of the same name fruitless.
Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread
continued alias problem -- some work, some don't, why? L A Walsh <bash@tlinx.org> - 2019-07-08 15:30 -0700
csiph-web