Replies: 1 comment
-
"not using universal variables" is fine, assuming you don't really need them
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to set a number of universal variables, in this case to enforce XDG base directory compliance. So, I might run:
This adds a few lines to my
fish_variables
file.However, because I'm very particular about these things, I'd like to have a separate file -- also used by fish to set variables in the same way -- that's specifically for these variables that I've set for this purpose. Ideally, I'd be able to set up a directory for drop-in configuration. This way, all of my universal variable definitions are separated between files on the basis of their function.
One way I could potentially do this might be by adding a script to
conf.d
that sources all files in a given folder. In fact, the docs seem to recommend this approach:However, the following line states:
But of course, from the command line I can only have them automatically added to
fish_variables
.So I suppose my question is: what's the canonical way to do this? I'd imagine I'm not the first person to be nitpicky about the structure of their stored config files, and so there's probably an obvious method I'm missing.
Maybe the solution is to save global variables, not universal ones? Then I could simply have them set on shell startup with a config snippet. Is this bad practice, considering that it's almost reinventing the universal-scope wheel?
Cheers.
Beta Was this translation helpful? Give feedback.
All reactions