fix deletions causing some empty clauses
This commit is contained in:
parent
6e87d180c2
commit
5a34d8c39e
2 changed files with 5 additions and 0 deletions
|
|
@ -334,6 +334,8 @@ bool debashify_readonly(list* in)
|
|||
}
|
||||
}
|
||||
}
|
||||
if(in->cls.size()<=0)
|
||||
in->add(make_condlist("true"));
|
||||
return has_found;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -419,6 +419,8 @@ bool r_delete_var(_obj* in, set_t* vars)
|
|||
t->cls.erase(t->cls.begin()+i);
|
||||
i--;
|
||||
}
|
||||
if(t->cls.size()<=0)
|
||||
t->add(make_condlist("true"));
|
||||
}
|
||||
}
|
||||
default: break;
|
||||
|
|
@ -567,6 +569,7 @@ std::string gen_json_struc(_obj* o)
|
|||
vec.push_back(std::make_pair(quote_string("type"), quote_string("redirect") ) );
|
||||
vec.push_back(std::make_pair(quote_string("op"), quote_string(t->op)));
|
||||
vec.push_back(std::make_pair(quote_string("target"), gen_json_struc(t->target)));
|
||||
vec.push_back(std::make_pair(quote_string("here_document"), gen_json_struc(t->here_document)));
|
||||
break;
|
||||
}
|
||||
case _obj::_arg :
|
||||
|
|
|
|||
Loading…
Reference in a new issue