Issue 141: Invariant when single letter option is completed to negated option variable

Reported by Thomas Keller, Feb 5, 2011

Steps to reproduce the problem:

$ mtn push -b foo

Expected result:

mtn: option error: unknown option 'b'

Actual results:

mtn: fatal: error: I(!is_cancel) 

Output of `mtn version --full`:

0.99.1 and 0.99

The "b" of "-b" is tried to be completed and 
since push has no other options that start with "b", it 
only matches
the global option "builtin-rcfile", which is the 
"cancel" version of "no-builtin-rcfile". The 
option parser on the other hand does not expect a single letter 
option to be completed to a negated option of a long option and 
therefor hits the above invariant.

Possible solutions include removing the invariant altogether, 
completing only on "--", not on "-" or 
completing only when at least two letters are given. The second 
solution seems to make the most sense.

Comment 1 by Thomas Keller, Feb 5, 2011

Fixed in rev 649eb10a3481b527990a261b6e6297020d9aed22
Status: Fixed

Created: 7 years 2 months ago by Thomas Keller

Updated: 7 years 2 months ago

Status: Fixed

Owner: Thomas Keller

Type:Incorrect Behavior

Quick Links:    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status