mirror of
git://git.gnu.org.ua/wordsplit.git
synced 2025-04-26 00:29:54 +03:00
Perform quote removal before command substitution
This commit is contained in:
parent
74ec801338
commit
b591f0aee6
1 changed files with 15 additions and 18 deletions
|
@ -1668,6 +1668,14 @@ wordsplit_process_list (struct wordsplit *wsp, size_t start)
|
|||
}
|
||||
}
|
||||
|
||||
if (wsnode_quoteremoval (wsp))
|
||||
return wsp->ws_errno;
|
||||
if (wsp->ws_flags & WRDSF_SHOWDBG)
|
||||
{
|
||||
wsp->ws_debug ("After quote removal:");
|
||||
wordsplit_dump_nodes (wsp);
|
||||
}
|
||||
|
||||
/* Expand commands */
|
||||
if (!(wsp->ws_flags & WRDSF_NOCMD))
|
||||
{
|
||||
|
@ -1692,26 +1700,15 @@ wordsplit_process_list (struct wordsplit *wsp, size_t start)
|
|||
}
|
||||
}
|
||||
|
||||
do
|
||||
if (wsnode_coalesce (wsp))
|
||||
return wsp->ws_errno;
|
||||
|
||||
if (wsp->ws_flags & WRDSF_SHOWDBG)
|
||||
{
|
||||
if (wsnode_quoteremoval (wsp))
|
||||
break;
|
||||
if (wsp->ws_flags & WRDSF_SHOWDBG)
|
||||
{
|
||||
wsp->ws_debug ("After quote removal:");
|
||||
wordsplit_dump_nodes (wsp);
|
||||
}
|
||||
|
||||
if (wsnode_coalesce (wsp))
|
||||
break;
|
||||
|
||||
if (wsp->ws_flags & WRDSF_SHOWDBG)
|
||||
{
|
||||
wsp->ws_debug ("Coalesced list:");
|
||||
wordsplit_dump_nodes (wsp);
|
||||
}
|
||||
wsp->ws_debug ("Coalesced list:");
|
||||
wordsplit_dump_nodes (wsp);
|
||||
}
|
||||
while (0);
|
||||
|
||||
return wsp->ws_errno;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue