aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <petsku@petteriraty.eu>2011-04-15 15:55:09 +0300
committerPetteri Räty <petsku@petteriraty.eu>2011-04-17 13:44:21 +0300
commit1f019750fae3c868c01104258c4184620338d674 (patch)
treeed32992b7fe16d03cdb3368ca6a7624737571eea /bashast/gunit/fname.gunit
parentParser: other expansions inside pathname expansion (diff)
downloadlibbash-1f019750fae3c868c01104258c4184620338d674.tar.gz
libbash-1f019750fae3c868c01104258c4184620338d674.tar.bz2
libbash-1f019750fae3c868c01104258c4184620338d674.zip
Parser: enable pound inside pathname expansion
You can now use POUND inside pathname expansion pattern matching like abcd[#d]
Diffstat (limited to 'bashast/gunit/fname.gunit')
-rw-r--r--bashast/gunit/fname.gunit2
1 files changed, 2 insertions, 0 deletions
diff --git a/bashast/gunit/fname.gunit b/bashast/gunit/fname.gunit
index eb8f080..126afe8 100644
--- a/bashast/gunit/fname.gunit
+++ b/bashast/gunit/fname.gunit
@@ -49,6 +49,8 @@ fname:
"tab\\ttab" -> "(STRING tab \\ \t tab)"
"abc[def]" -> (STRING abc (MATCH_PATTERN def))
"abc[d${more}]" -> (STRING abc (MATCH_PATTERN d (VAR_REF more)))
+"abc[#d]" -> (STRING abc (MATCH_PATTERN # d))
+"abc[d#]" -> (STRING abc (MATCH_PATTERN d #))
"a[]" -> (STRING a [ ])
"ab[d-h]" -> (STRING ab (MATCH_PATTERN d - h))
"ab[!d-h]" -> (STRING ab (MATCH_ANY_EXCEPT d - h))