运行 在 MATLAB 上通过别名使用 zsh 的命令行
Run command line via alias with zsh on MATLAB
我在 Matlab 上使用 system/unix
命令,以便通过命令行 运行 外部程序。我想通过在我的计算机上 .zshrc
中定义的别名来执行它。不幸的是,别名似乎不可用。
示例 ll
- 在终端上:
which ll
给出 ll: aliased to ls -lh
- 在 Matlab 上:
unix('ll')
给出 zsh:1: command not found: ll
我检查我是否使用正确 shell: unix('echo $SHELL')
给出 /usr/local/bin/zsh
.
我在我的 .zshrc
中添加了 setopt aliases
但它没有任何改变。非交互式打开时是否可以检查使用了哪些启动文件shell?
~/.zshrc
在非交互情况下好像没有加载。解决方案包括加载别名并在 ~/.zshenv
中添加 setopt aliases
。例如参见 [=13=]。
我在 Matlab 上使用 system/unix
命令,以便通过命令行 运行 外部程序。我想通过在我的计算机上 .zshrc
中定义的别名来执行它。不幸的是,别名似乎不可用。
示例 ll
- 在终端上:
which ll
给出ll: aliased to ls -lh
- 在 Matlab 上:
unix('ll')
给出zsh:1: command not found: ll
我检查我是否使用正确 shell: unix('echo $SHELL')
给出 /usr/local/bin/zsh
.
我在我的 .zshrc
中添加了 setopt aliases
但它没有任何改变。非交互式打开时是否可以检查使用了哪些启动文件shell?
~/.zshrc
在非交互情况下好像没有加载。解决方案包括加载别名并在 ~/.zshenv
中添加 setopt aliases
。例如参见 [=13=]。