Perl 6 的 shell() 使用哪个 shell? [英] Which shell does Perl 6's shell() use?
本文介绍了Perl 6 的 shell() 使用哪个 shell?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Perl 6 的 shell 向shell"发送命令但没有说明那是什么.我一直在我的机器上使用 bash,但我不知道我是否可以依赖它.
Perl 6's shell sends commands to the "shell" but doesn't say what that is. I consistently get bash on my machine but I don't know if I can rely on that.
$ perl6 -e 'shell( Q/echo $SHELL/ )'
/bin/bash
$ csh
% perl6 -e 'shell( Q/echo $SHELL/ )'
/bin/bash
% zsh
$ perl6 -e 'shell( Q/echo $SHELL/ )'
/bin/bash
这在 Unix 上很容易记录,但是 cmd.exe 或 Windows 上的 PowerShell(或 bash 如果已安装)呢?我认为它是 cmd.exe 但记录在案的答案会很好.
That's easy enough on Unix when it's documented, but what about cmd.exe or PowerShell on Windows (or bash if it's installed)? I figure it's the cmd.exe but a documented answer would be nice.
推荐答案
看源码,rakudo 只在非窗口上调用 /bin/sh -c
并使用 %*ENV
在 Windows 上.
Looking at the source, rakudo just calls /bin/sh -c
on non-windows and uses %*ENV<ComSpec> /c
on windows.
这篇关于Perl 6 的 shell() 使用哪个 shell?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文