在切换到 fish shell 之前,我经常在zsh
with中使用各种命令which some_command
。一个例子可能是:
$ file `which zsh`
/opt/local/bin/zsh: Mach-O 64-bit executable arm64
/bin/zsh: Mach-O universal binary with 2 architectures: [x86_64:Mach-O 64-bit executable x86_64
- Mach-O 64-bit executable x86_64] [arm64e:Mach-O 64-bit executable arm64e
- Mach-O 64-bit executable arm64e]
/bin/zsh (for architecture x86_64): Mach-O 64-bit executable x86_64
/bin/zsh (for architecture arm64e): Mach-O 64-bit executable arm64e
当我尝试使用fish
它失败时:
$ which zsh
/opt/local/bin/zsh
$ file `which zsh`
`which: cannot open ``which' (No such file or directory)
zsh`: cannot open `zsh`' (No such file or directory)
fish
知道为什么这与其他更像 bash 的 shell 相比不起作用吗?