Commit d5f705b9 authored by jan.koester's avatar jan.koester
Browse files

test

parent 1e19b1cb
Loading
Loading
Loading
Loading
+6 −1
Changes for src/shell.cpp: 6 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -3569,7 +3569,12 @@ int fresh::Shell::runSegmentWords(const std::string &input,const std::vector<She
            bool noArg=(t=="2>&1" || t=="1>&2");
            if(takesArg && redirEnd+1<to){
                redirTokens.push_back(t);
                redirTokens.push_back(words[redirEnd+1].text);
                // the target word is raw text here ("${depfile}" with its
                // quotes): expand it like any simple command's redirection,
                // or gen_kheaders.sh's '{ ...; } > "${depfile}"' wrote a file
                // literally named "${depfile}"
                std::vector<std::string> target=tokenizeShellArgs(words[redirEnd+1].text);
                redirTokens.push_back(target.empty() ? std::string() : target[0]);
                redirEnd+=2;
            }else if(noArg){
                redirTokens.push_back(t);