Browse Source

:bug: Ne considere plus >& comme une erreur

Loquicom 6 years ago
parent
commit
0ea875b1fe
1 changed files with 2 additions and 2 deletions
  1. 2 2
      parser.c

+ 2 - 2
parser.c

@@ -42,8 +42,8 @@ int nb_commands(char* line){
                 line++;
                 compteur++;
             }
-            //Sinon il doit y avoir un vide pour etre le & du bck
-            else if(*(line + 1) != '\0'){
+            //Sinon il doit y avoir un vide pour etre le & du bck ou un > avant
+            else if(*(line + 1) != '\0' && *(line - 1) != '>'){
                 return SHELL_ERR;
             }
         }