88use Symfony \Component \Console \Input \InputOption ;
99use PHPCR \Shell \Console \Application \ShellApplication ;
1010use PHPCR \Shell \Console \Application \Shell ;
11- use Symfony \ Component \Console \Input \StringInput ;
11+ use PHPCR \ Shell \Console \Input \StringInput ;
1212
1313/**
1414 * The shell command is the command used to configure the shell session
@@ -63,7 +63,7 @@ public function configure()
6363
6464 new InputOption ('--profile ' , '-p ' , InputOption::VALUE_OPTIONAL , 'Speicfy a profile name, use wit <info>--transport</info> to update or create ' ),
6565 new InputOption ('--unsupported ' , null , InputOption::VALUE_NONE , 'Show all commands, including commands not supported by the repository ' ),
66- new InputOption ('--command ' , null , InputOption::VALUE_REQUIRED , 'Run the given command ' ),
66+ new InputOption ('--command ' , null , InputOption::VALUE_REQUIRED |InputOption:: VALUE_IS_ARRAY , 'Run the given command ' ),
6767 ));
6868 }
6969
@@ -80,10 +80,14 @@ public function execute(InputInterface $input, OutputInterface $output)
8080
8181 $ noInteraction = $ input ->getOption ('no-interaction ' );
8282
83- if ($ command = $ input ->getOption ('command ' )) {
83+ if ($ commands = $ input ->getOption ('command ' )) {
8484 $ application ->setCatchExceptions (false );
85- $ input = new StringInput ($ command );
86- $ application ->run ($ input , $ output );
85+ $ application ->setAutoExit (false );
86+
87+ foreach ($ commands as $ command ) {
88+ $ input = new StringInput ($ command );
89+ $ application ->run ($ input , $ output );
90+ }
8791
8892 return ;
8993 } else {
0 commit comments