[英]How to set environment variables in .xsh file?
我想在我的foo.xsh
文件中覆蓋環境變量,就像這樣
$FOO = "foo"
但在我調用xonsh foo.xsh
, $FOO
未設置。
有任何想法嗎?
運行xonsh foo.xsh
在單獨的會話中設置$FOO
,該會話在程序foo.xsh
終止時關閉。
如果要在當前會話中保留foo.xsh
的內容,可以使用source foo.xsh
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.