From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1Sb6pC-0001Mn-Ke for garchives@archives.gentoo.org; Sun, 03 Jun 2012 09:10:14 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B0FB4E07DF; Sun, 3 Jun 2012 09:08:42 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 80BB4E07DF for ; Sun, 3 Jun 2012 09:08:42 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id D47981B400C for ; Sun, 3 Jun 2012 09:08:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id E42D6E543C for ; Sun, 3 Jun 2012 09:08:38 +0000 (UTC) From: "Petteri Räty" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Petteri Räty" Message-ID: <1330572778.66be73c1d8a0c253d34ee76206982e3cf12954b7.betelgeuse@gentoo> Subject: [gentoo-commits] proj/libbash:master commit in: scripts/, bashast/ X-VCS-Repository: proj/libbash X-VCS-Files: bashast/bashast.g scripts/command_execution.bash X-VCS-Directories: scripts/ bashast/ X-VCS-Committer: betelgeuse X-VCS-Committer-Name: Petteri Räty X-VCS-Revision: 66be73c1d8a0c253d34ee76206982e3cf12954b7 X-VCS-Branch: master Date: Sun, 3 Jun 2012 09:08:38 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 58250856-9ef4-4667-97dd-ea366cb30c8b X-Archives-Hash: 197ad866fe21635bab5e277c7d02d523 commit: 66be73c1d8a0c253d34ee76206982e3cf12954b7 Author: Mu Qiao gentoo org> AuthorDate: Thu Mar 1 03:32:58 2012 +0000 Commit: Petteri R=C3=A4ty gentoo org> CommitDate: Thu Mar 1 03:32:58 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/libbash.git;a= =3Dcommit;h=3D66be73c1 Walker: support indirect ref in runtime --- bashast/bashast.g | 2 +- scripts/command_execution.bash | 5 +++++ 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/bashast/bashast.g b/bashast/bashast.g index 0be9b46..98da5e7 100644 --- a/bashast/bashast.g +++ b/bashast/bashast.g @@ -860,7 +860,6 @@ parameter_expansion TIMES -> ^(BANG variable_name_for_bang TIMES) | AT -> ^(BANG variable_name_for_bang AT) | LSQUARE (op=3DTIMES|op=3DAT) RSQUARE -> ^(LIST_EXPAND variable_nam= e_for_bang $op) - | -> ^(VAR_REF variable_name_for_bang) ) | {LA(1) =3D=3D POUND && LA(2) !=3D RBRACE }? =3D> variable_size_ref; parameter_delete_operator @@ -915,6 +914,7 @@ variable_name : num | name LSQUARE AT RSQUARE -> ^(ARRAY name AT) | name LSQUARE TIMES RSQUARE -> ^(ARRAY name TIMES) + | BANG variable_name_for_bang -> ^(VAR_REF variable_name_for_bang) | variable_name_no_digit | DOLLAR | TIMES diff --git a/scripts/command_execution.bash b/scripts/command_execution.b= ash index e400409..06d6676 100644 --- a/scripts/command_execution.bash +++ b/scripts/command_execution.bash @@ -79,3 +79,8 @@ echo \`\(\)\$\>\<\` export SRC_URI=3D"${SRC_URI} http://www.oracle.com/technology/products/b= erkeley-db/db/update/${MY_PV}/patch.${MY_PV}.${i}" > /dev/null (( i=3D1, j=3D2)) && echo $i $j +a=3D"ab cd ef" +variable=3Da +echo "${!variable// /_}" +echo "${!#// /_}" +echo "${!1// /_}"