gpt4 book ai didi

windows - 为复杂调用设置别名

转载 作者:可可西里 更新时间:2023-11-01 11:20:26 25 4
gpt4 key购买 nike

我正在尝试设置一个别名来访问我的方案解释器。我尝试了以下方法:

set-alias scheme '& "C:\Program Files (x86)\MIT-GNU Scheme\bin\mit-scheme.exe" --library "C:\Program Files (x86)\MIT-GNU Scheme\lib"'

当调用 scheme 时,我收到以下错误消息:

Cannot resolve alias 'scheme' because it refers to term '& "C:\Program Files (x86)\MIT-GNU Scheme\bin\mit-scheme.exe" -
-library "C:\Program Files (x86)\MIT-GNU Scheme\lib"', which is not recognized as a cmdlet, function, operable program,
or script file. Verify the term and try again.
At line:1 char:7
+ scheme <<<<
+ CategoryInfo : ObjectNotFound: (scheme:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : AliasNotResolvedException

调用 & "C:\Program Files (x86)\MIT-GNU Scheme\bin\mit-scheme.exe"--library "C:\Program Files (x86)\MIT-GNU Scheme\lib " 另一方面,直接工作正常。

最佳答案

别名功能适用于简单的名称别名,不允许参数。你需要的是一个函数,例如:

function scheme {
& "C:\Program Files (x86)\MIT-GNU Scheme\bin\mit-scheme.exe" --library "C:\Program Files (x86)\MIT-GNU Scheme\lib"
}

关于windows - 为复杂调用设置别名,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13618213/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com