Closed mattcargile closed 1 month ago
I'd expect a return of
-verbose
isn't an option. I assume this is a bug ingetopt
.
That's by design, since the getopt
function conforms to the GNU standard for parsing long and short CLI options.
I'd expect a return of
-verbose
isn't an option. I assume this is a bug ingetopt
.That's by design, since the
getopt
function conforms to the GNU standard for parsing long and short CLI options.
It is by design to say Option -e not recognized when a user passes in -verbose
? "I didn't pass in any -e
" . Or maybe I am missing something?
@mattcargile Yes. In GNU/POSIX standard, the single-hyphen prefixed -verbose
passed by user is parsed as mixed short options: -v
, -e
, -r
, -b
, -o
, -s
and -e
again.
@mattcargile Yes. In GNU/POSIX standard, the single-hyphen prefixed
-verbose
passed by user is parsed as mixed short options:-v
,-e
,-r
,-b
,-o
,-s
and-e
again.
Ah, of course! That is embarrassing for me. :'-)
Thanks for breaking down. That didn't immediately occur to me.
Bug Report
Current Behavior
scoop alias list --verbose
returns scoop alias: Option --verbose not recognized..Expected Behavior
It should output the
Summary
property.Additional context/output
scoop alias list -v
andscoop alias list -verbose
works. Docsscoop alias --help
reflects--verbose
.Possible Solution
I assume it is something with this line.
https://github.com/ScoopInstaller/Scoop/blob/be56faf29016a3bb82f5bc15d3e4621930ea7a38/libexec/scoop-alias.ps1#L42
The edit would be a removal of the comment since
verbose
is a long option.Once removed, the other problematic UX, is that
scoop alias list -verbose
returns scoop alias: Option -e not recognized. which is confusing as a user. I'd expect a return of-verbose
isn't an option. I assume this is a bug ingetopt
.System details
Windows version: 10
OS architecture: 64bit
PowerShell version: 7.4.3
Additional software:
Scoop Configuration