diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d53283..6b6c7e9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### 2025-09-29 grimblast: add getopt to Nix wrapper +grimblast: refactor getopt error handling to avoid duplicate error messages ### 2025-09-15 diff --git a/grimblast/grimblast b/grimblast/grimblast index 7f11f80..fd3e6d1 100755 --- a/grimblast/grimblast +++ b/grimblast/grimblast @@ -313,7 +313,7 @@ main() { local parsed_args parsed_args="$(getopt --name "$NAME" --options 'nocfe:w:s:t:' --longoptions 'notify,openparentdir,cursor,freeze,expire-time:,wait:,scale:,filetype:' -- "$@")" || { - echo "$NAME: ERROR: failed to parse arguments" >&2 + usage >&2 exit 1 } eval "set -- $parsed_args" diff --git a/grimblast/grimblast.1.scd b/grimblast/grimblast.1.scd index 43a26ae..ddee4cd 100644 --- a/grimblast/grimblast.1.scd +++ b/grimblast/grimblast.1.scd @@ -6,8 +6,8 @@ grimblast - a helper for screenshots within Hyprland # SYNOPSIS -*grimblast* [-n|--notify] [-o|--openparentdir] [-e|--expire-time ] [-c|--cursor] [-f|--freeze] [-w N|--wait N] [-s N|--scale N] [-t TYPE|--filetype TYPE] (copy|save|copysave|edit) [TARGET] [FILE] -*grimblast* check +*grimblast* [OPTIONS] (copy|save|copysave|edit) [TARGET] [FILE]++ +*grimblast* check++ *grimblast* usage # OPTIONS