Commit 1c865bf2 by Niklas Een

Added -C to command line for running commands, then staying in interactive mode

parent 784a3579
......@@ -138,13 +138,18 @@ int Abc_RealMain( int argc, char * argv[] )
sprintf( sWriteCmd, "write" );
Extra_UtilGetoptReset();
while ((c = Extra_UtilGetopt(argc, argv, "c:hf:F:o:st:T:xb")) != EOF) {
while ((c = Extra_UtilGetopt(argc, argv, "c:C:hf:F:o:st:T:xb")) != EOF) {
switch(c) {
case 'c':
strcpy( sCommandUsr, globalUtilOptarg );
fBatch = 1;
break;
case 'C':
strcpy( sCommandUsr, globalUtilOptarg );
fBatch = 2;
break;
case 'f':
sprintf(sCommandUsr, "source %s", globalUtilOptarg);
fBatch = 1;
......@@ -264,8 +269,14 @@ int Abc_RealMain( int argc, char * argv[] )
}
}
if (fBatch == 2){
fBatch = 0;
pAbc->fBatchMode = 0;
}
}
else
if ( !fBatch )
{
// start interactive mode
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment