Simplify causesSubshell

This commit is contained in:
Joseph C. Sible 2020-04-05 15:30:28 -04:00
parent 14ee462ccd
commit f55d8c45e5
1 changed files with 3 additions and 5 deletions

View File

@ -460,11 +460,9 @@ leadType params t =
causesSubshell = do causesSubshell = do
(T_Pipeline _ _ list) <- parentPipeline (T_Pipeline _ _ list) <- parentPipeline
if length list <= 1 return $ case list of
then return False _:_:_ -> not (hasLastpipe params) || getId (last list) /= getId t
else if not $ hasLastpipe params _ -> False
then return True
else return . not $ (getId . head $ reverse list) == getId t
getModifiedVariables t = getModifiedVariables t =
case t of case t of