env_parallel:92:参数列表太长:/ usr / bin / parallel

时间:2019-07-08 21:28:46

标签: zsh gnu-parallel

我正在尝试使用此处发布的解决方案:https://stackoverflow.com/a/50497981/9355411

,并有一个.zshrc,例如:

. $(which env_parallel.zsh)

当我致电env_parallel时,出现以下错误:

  

env_parallel:92: argument list too long: /usr/bin/parallel

1 个答案:

答案 0 :(得分:1)

我认为您运行的版本<20180722 然后将其运行为:

env_parallel echo ::: foo

这将尝试复制完整的环境(所有别名,所有函数,所有数组和所有变量)。不幸的是zsh使用execve来启动程序,而execve通常仅支持128 KB的环境。

那该怎么办?如果您升级到20190622,env_parallel会出现此错误:

env_parallel: Error: Your environment is too big.
env_parallel: Error: You can try 3 different approaches:
env_parallel: Error: 1. Run 'env_parallel --session' before you set
env_parallel: Error:    variables or define functions.
env_parallel: Error: 2. Use --env and only mention the names to copy.
env_parallel: Error: 3. Try running this in a clean environment once:
env_parallel: Error:      env_parallel --record-env
env_parallel: Error:    And then use '--env _'
env_parallel: Error: For details see: man env_parallel

所以尝试其中的建议之一。

从20180522开始支持

--session

相关问题