문제

I would like to run the following command:

for i in git python gcc java pip
    $i --version                
end                             

But fish tells me to use a function. I am not sure what the best way to do this is.

도움이 되었습니까?

해결책

The eval command works for this, but would a function be more appropriate as fish suggests?

for i in git python gcc java pip
    eval $i --version                
end
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top