New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: command to find location of rc.elv file #1385
Comments
Without commenting on whether or not this should be implemented I'll note that you can capture this information today when rc.elv is executed using the |
Expanding on this feature request, I think it would be nice to have variables or functions which contain all the different directories of the XDG spec. If the user is still using the This would significantly simplify the work of module authors when there is a need to store data somewhere. |
My recommendation is to implement this as variables in the Note that the proposed |
I opened issue #1420 when I was surprised that the ~/.config/elvish/rc.elv I synced from my macOS to Windows 10 system was not read on the latter system. I might have found the problem, without resorting to add a |
Note that building elvish from HEAD as I type this will result in this warning if you
That is because that module has a hardcoded path: |
FWIW, I've been working on implementing this feature. I've decided that the var for this issue should be named |
There are several paths used by Elvish internally that should also be visible to Elvish scripts. This change exposes two of those paths via the `platform` module. Thus making it easier for Elvish scripts to determine where various files live and, more importantly, should be written. The latter is especially important for transient state files that should be placed in the same, or a subdirectory of, the directory used for the Elvish database file. Resolves elves#1385
There are several paths used by Elvish internally that should also be visible to Elvish scripts. This change exposes two of those paths via the `platform` module. Thus making it easier for Elvish scripts to determine where various files live and, more importantly, should be written. The latter is especially important for transient state files that should be placed in the same, or a subdirectory of, the directory used for the Elvish database file. Resolves elves#1385
There are several paths used by Elvish internally that should also be visible to Elvish scripts. This change exposes two of those paths via the `platform` module. Thus making it easier for Elvish scripts to determine where various files live and, more importantly, should be written. The latter is especially important for transient state files that should be placed in the same, or a subdirectory of, the directory used for the Elvish database file. Resolves elves#1385
There are several paths used by Elvish internally that should also be visible to Elvish scripts. This change exposes three of those paths via the `platform` module. Thus making it easier for Elvish scripts to determine where various files live and, more importantly, should be written. The latter is especially important for transient state files that should be placed in the same, or a subdirectory of, the directory used for the Elvish database file. Resolves elves#1385
Now that #383 has been fixed, the location of
rc.elv
is less obvious. It would be nice if there was an Elvish command to determine the location ofrc.elv
. Other shells that vary the location of their config files based on OS or environment variables already provide a way to do this:echo $profile
config path
The text was updated successfully, but these errors were encountered: