Skip to content

Commit 9c5ecfd

Browse files
register.cc: Quote stripping
If a command has a single argument, and that argument is quoted, strip the quotes. Allows e.g. `log "yosys> flatten;;"`, logging the unquoted text `yosys> flatten;;`.
1 parent 855ac28 commit 9c5ecfd

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

kernel/register.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,9 @@ void Pass::call(RTLIL::Design *design, std::vector<std::string> args)
299299
if (args.size() == 0 || args[0][0] == '#' || args[0][0] == ':')
300300
return;
301301

302+
if (args.size() == 2 && args[1][0] == '"' && args[1][args[1].size()-1] == '"')
303+
args[1] = args[1].substr(1, args[1].size()-2);
304+
302305
if (echo_mode) {
303306
log("%s", create_prompt(design, 0));
304307
for (size_t i = 0; i < args.size(); i++)

0 commit comments

Comments
 (0)