-
-
Notifications
You must be signed in to change notification settings - Fork 361
g.findfile: use element aliases #5998
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
base: main
Are you sure you want to change the base?
Conversation
@@ -74,6 +75,12 @@ int main(int argc, char *argv[]) | |||
l_flag->description = _("List available elements and exit"); | |||
l_flag->suppress_required = YES; | |||
|
|||
t_flag = G_define_flag(); | |||
t_flag->key = 't'; | |||
t_flag->label = _("Return code 0 when file found, 1 otherwise"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the terminology, exit code or return code? Is it clear for the translators?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exit status and return code are the same thing, I think it would be difficult to guess what translators are more familiar with. I copied this from r.mask.status.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming nothing is wrong in the C file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
C code looks fine to me!
g.findfile didn't take raster/raster_3d/region, even though g.findfile -l lists them. This PR fixes that.
Also adds a new -t flag similarly to r.mask.status to get the error code without printing the results. In the future, without -t it should always return success.