I’m trying to set an alias for accessing my scheme interpreter. I tried the following:
set-alias scheme '& "C:\Program Files (x86)\MIT-GNU Scheme\bin\mit-scheme.exe" --library "C:\Program Files (x86)\MIT-GNU Scheme\lib"'
When calling scheme I get the following error message:
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
Calling & "C:\Program Files (x86)\MIT-GNU Scheme\bin\mit-scheme.exe" --library "C:\Program Files (x86)\MIT-GNU Scheme\lib" directly works fine on the other hand.
The alias feature is meant for simple name aliases and doesn’t allow for arguments. What you need is a function e.g.: