Changeset 5138 for icGREP


Ignore:
Timestamp:
Aug 30, 2016, 12:49:57 AM (3 years ago)
Author:
aambarts
Message:

Fixed -gs flag not working when backreferencing is used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • icGREP/icgrep-devel/icgrep/icgrep.cpp

    r5107 r5138  
    180180
    181181            if (!isArgUnwantedForIcGrep(argv[i])) {
     182                // Wrap everything in quotes since the arguments passed into this program had them stripped by bash.
     183                icGrepArguments.append("\"");       
    182184                icGrepArguments.append(argv[i]);
    183                 icGrepArguments.append(" ");
     185                icGrepArguments.append("\" ");
    184186            }
    185187
    186188            if (!isArgUnwantedForGrep(argv[i])) {
     189                grepArguments.append("\"");
    187190                grepArguments.append(argv[i]);
    188                 grepArguments.append(" ");
     191                grepArguments.append("\" ");
    189192            }
    190193        }
     
    196199    systemCall.append(" | grep --color=always -P ");
    197200    systemCall.append(grepArguments);
     201
    198202    system(systemCall.c_str());
    199203}
Note: See TracChangeset for help on using the changeset viewer.