hwatch icon indicating copy to clipboard operation
hwatch copied to clipboard

Short option value cannot be directly attached

Open injust opened this issue 4 months ago • 1 comments

If I run hwatch -n60 true, -n60 is not parsed as an option to hwatch. Instead, it is included in the command (i.e. -n60 true).

This produces some very confusing error messages:

$ hwatch -d -n60 true
error: invalid value '-n60' for '--differences [<differences>]'
  [possible values: none, watch, line, word]

For more information, try '--help'.
$ hwatch -n60 true
sh: -6: invalid option                                                                                                                                                                  >>latest
Usage:  sh [GNU long option] [option] ...                                                                                                                                                 2025-08-16 07:35:18.628
    sh [GNU long option] [option] script-file ...
GNU long options:
    --debug
    --debugger
    --dump-po-strings
    --dump-strings
    --help
    --init-file
    --login
    --noediting
    --noprofile
    --norc
    --posix
    --protected
    --rcfile
    --restricted
    --verbose
    --version
    --wordexp
Shell options:
    -irsD or -c command or -O shopt_option      (invocation only)
    -abefhkmnptuvxBCHP or -o option

injust avatar Aug 16 '25 10:08 injust

Thankyou issue. I see. It's certainly confusing 🤔 .

Let me think about how to deal with this.

blacknon avatar Aug 18 '25 04:08 blacknon