Windows CMD 中是否有与 bash 或 tcsh 中等效的源命令? [英] Is there an equivalent source command in Windows CMD as in bash or tcsh?

查看:41
本文介绍了Windows CMD 中是否有与 bash 或 tcsh 中等效的源命令?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在 unix 世界中,如果你编辑你的 .profile.cshrc 文件,你可以做一个 source ~/.profilesource ~/.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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆