Skip to content

Commit 1fab0f9

Browse files
committed
misc/review: turn on extglob optoin when reading an extended glob pattern
Signed-off-by: Masatake YAMATO <[email protected]>
1 parent 2399512 commit 1fab0f9

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

misc/review

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,15 +184,18 @@ units_inspect_show_input ()
184184
inspect_cmd_show_generic $tcase $(basename ./Units/${tcase}/input.*) pygmentize_or_cat
185185
}
186186
187+
# See https://stackoverflow.com/questions/65533232/bash-extglob-pattern-matching-breaks-when-enclosed-in-a-function
188+
shopt -s extglob
187189
units_inspect_show_expected_tags ()
188190
{
189191
local tcase=$1
190192
191193
(
192194
shopt -s extglob
193-
inspect_cmd_show_generic $tcase $(basename ./Units/${tcase}/expected.tags?(-*)) "cat" "-n"
195+
inspect_cmd_show_generic $tcase $(basename ./Units/${tcase}/expected.tags?\(-*\)) "cat" "-n"
194196
)
195197
}
198+
shopt -u extglob
196199

197200
inspect_cmd_quit ()
198201
{

0 commit comments

Comments
 (0)