Description
The -r short flag for --raw is defined with a colon in the getopt string, meaning it expects an argument, but the case handler does not consume one.
Line 235:
local options=$(getopt -o hf:o:m:dszr:t: --long help,filename:,output-folder:,mode:,clipboard-only,debug,silent,freeze,raw,notif-timeout: -- "$@")
The -r: tells getopt that -r takes a required argument. But the case handler (line 268-269) just sets RAW=1 without shift:
This causes -r to silently consume the next argument. For example, hyprshot -m region -r may not work as expected because -r eats a subsequent positional value.
The long form --raw works correctly since it has no colon in the --long definition.
Fix
Change the getopt short options from:
to:
(Remove the colon after r)
Environment
- hyprshot 1.3.0-4
- Arch Linux
Description
The
-rshort flag for--rawis defined with a colon in the getopt string, meaning it expects an argument, but the case handler does not consume one.Line 235:
The
-r:tells getopt that-rtakes a required argument. But the case handler (line 268-269) just setsRAW=1withoutshift:This causes
-rto silently consume the next argument. For example,hyprshot -m region -rmay not work as expected because-reats a subsequent positional value.The long form
--rawworks correctly since it has no colon in the--longdefinition.Fix
Change the getopt short options from:
to:
(Remove the colon after
r)Environment