我以前用 bash 来做这个......
/bin/bash --rcfile /home/sindhu/bin/misc_scripts/shellrc/.bashrc_1
我怎样才能用 zsh 完成同样的事情?
谢谢。
最佳答案
您可以使用 ZDOTDIR
变量来近似该特征。
在这样的目录中:
mkdir /home/sindhu/bin/misc_scripts/shellrc/.zshrc_1
创建一个名为 .zshrc
的文件,其中包含您的备用启动脚本。然后你就可以像这样启动 zsh 了:
ZDOTDIR=/home/sindhu/bin/misc_scripts/shellrc/.zshrc_1 zsh
关于bash - 如何通过命令行选项加载不同的 zshrc 文件?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2727172/