Windows CMD 中是否有与 bash 或 tcsh 中等效的源命令? [英] Is there an equivalent source command in Windows CMD as in bash or tcsh?
问题描述
我知道在 unix 世界中,如果你编辑你的 .profile
或 .cshrc
文件,你可以做一个 source ~/.profile
或 source ~/.cshrc
以获得对当前会话的影响.如果我在 Windows 上更改了系统变量中的某些内容,如何在不退出命令提示符会话并打开另一个命令提示符会话的情况下使其影响当前命令提示符会话?
I know that in the unix world, if you edit your .profile
or .cshrc
file, you can do a source ~/.profile
or source ~/.cshrc
to get the effect on your current session. If I changed something in the system variable on Windows, how can I have it effect the current command prompt session without exiting the command prompt session and opening another command prompt session?
推荐答案
恐怕不行,但您可以开始使用 Powershell,它确实支持点源.由于 powershell 窗口实际上是基于 cmd 的,因此您的所有 dos 命令都将继续运行,并且您将获得新的力量,更多的力量.
I am afraid not, but you can start using Powershell, which does support dot sourcing. Since powershell window is really based on cmd so all your dos command will continue to work, and you gain new power, much more power.
这篇关于Windows CMD 中是否有与 bash 或 tcsh 中等效的源命令?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!