elves / elvish

Powerful scripting language & versatile interactive shell

Home Page:https://elv.sh/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

new rc location not being read

ThinkSalat opened this issue · comments

according to documentation here, the rc.elv file should be located in %AppData%\elvish\rc.elv. On windows, this goes to ~\AppData\Roaming\elvish. however it is not reading from this rc.elv. When I place the same rc.elv in the legacy folder, ~\.elvish\rc.elv, it does read from the rc.elv file

elvish --version? Also, if the legacy path exists it is used even if the AppData path exists unless you're running the latest version of Elvish. So make sure only one of those files exists. And if you're running a sufficiently new version of Elvish then running put $runtime:effective-rc-path $runtime:rc-path can be helpful.

Huh. I think something is wrong with my install... I have it in program files. I downloaded the exe from here.
image

Same thing happens whenever I run ls, mkdir, etc. I followed everything here, then tried to install starship

this issue comes up trying to enter the put command above as well:

image

Only the builtin module is imported automatically. You have to explicitly import all other modules. I put this at the top of my rc.elv:

# Standard elvish modules we always want to be readily available.
use builtin
use epm
use file
use flag
use math
use path
use platform
use re
use readline-binding
use runtime
use store
use str

# Make my modules available.
use interactive
use github.com/krader1961/elvish-lib/util

The most likely reason the elvish binary isn't found is because you are modifying E:PATH (or paths) in your rc.elv. Programs like ls are not built into Elvish. They are external commands you'll need to install and put the appropriate directory in E:PATH.

Thanks for your help in the matrix Kurt. Closing this as resolved.

The issue: I had XDG_CONFIG_HOME set to a nonexistent directory, and I also didn't have the elvish install directory in my path.