-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add functions to work with filesystem paths: expand_path
, get_home
, get_abspath
#3057
base: master
Are you sure you want to change the base?
Conversation
I've chosen slightly different names than those in |
The Currently in function names "path" is used to refer to a path expression, could this make things confusing? @nicowilliams how would this fit naming-wise with the other IO stuff you worked on? |
I'm for
|
Also those functions have |
How about some docs? |
Some tests would be nice too |
|
Yeah, you're right @itchyny; from these, only |
I'm thinking this can be archived if system() (#1614) is included. Long term feature request though. |
If my PR for the |
This PR brings to the public interface three functions already available in
util.h
.get_home
get_abspath
expand_path
Along with the already available
env
function, they can make jq play more nicely with the filesystem.Here's what they look like.