Skip to content

Short option value cannot be directly attached #201

@injust

Description

@injust

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions