-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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] Add ~/.jq.d to default module search path #2966
Comments
|
My apologies for not being explicit with my meaning.
I would like a number of macros autoloaded on startup (hence Unless I'm mistaken, I cannot create a file and a directory of the same name, so I'm suggesting adding Sorry for not simply saying that in the beginning. |
Sure it should work? i can't manage to get it working. Also tried Lines 178 to 203 in 5029328
~/.jq is a directory stat will succeed and not end up trying main.jq and .jq . I'm also confused by the comments Try ${search_dir}/$(dirname ${rel_path})/jq/main.jq and Try ${search_dir}/${rel_path}/$(basename ${rel_path}).jq but don't see any dirname -ish call?
Get a feeling all this could be clarified a bit in the documentation also :) |
Hmm, you are right; having Only if Lines 423 to 431 in 5029328
I don't know what the |
100% if the The EDIT: I take that back. A quick test shows when module "X" calls |
To clarify what I mean by this.. As a test, I created the file This is the result of some linuxy magic show how "second" is located.
Note that it will search for Since it is being included by "test/jq/main.jq" is should be sourced there first. This will help ensure any package containing multiple files can get sourced correctly without namespacing issues. |
I have a number of "safe" macro's I load in
~/.jq
because it will autoload and is super convenient for interactive use.Unfortunately this makes it impossible to have a fixed location in
$HOME
for dynamically loaded macros.If I use the
-L
option, the standard search path is cleared, so its not as helpful as it sounds.Can the directory
~/.jq.d
be added to the start of the default module search path, so that fixed location is available fordynamic loading which does not require root privileges or conflict with autoloaded macros?
Also, but less important, is it possible to add
$XDG_CONFIG_HOME
support? Something like adding~/.config/jq/jq
(yeah, its a mess, configs in$XDG_CONFIG_HOME
tend to drop the leading.
) as an autoading module, and adding~/.config/jq
or~/.configs/jq/lib
to the module search path? I try to move configs to~/.config
whenever possible to reduce clutter in$HOME
.Thanks.
The text was updated successfully, but these errors were encountered: