chore(debashify): debashify procsub in redirects

This commit is contained in:
zawz 2022-02-04 16:50:44 +01:00
parent 8f0fd6f956
commit 0903cf41a1
2 changed files with 12 additions and 0 deletions

View file

@ -782,6 +782,14 @@ bool debashify_procsub(list_t* lst, debashify_params* params)
}
}
}
for(auto reit: cmit->redirs) {
arg_t* ait=reit->target;
if(ait != nullptr && ait->size() == 1 && ait->sa[0]->type == _obj::subarg_procsub)
{
subarg_procsub_t* st = dynamic_cast<subarg_procsub_t*>(ait->sa[0]);
affected_args.push_back( std::make_pair(ait, st->is_output) );
}
}
}
}
// perform the replace

View file

@ -44,3 +44,7 @@ echo ${TITI:-bar}
TATA=TOTO
echo ${!TATA}
for I in A B C ; do
echo "$I"
done > >(grep A)