Commit e42dcd7
committed
fix(argparse): prefer positional hint over flags when input is empty
Modified ArgparseCompleter to only fallback to flag completion when the current positional argument is full (reached its max nargs) instead of just reaching its minimum. This fixes an issue where commands with optional positional arguments (like 'history') would automatically complete '-' and show flags instead of the more useful positional hint text when tab-completed with no input.1 parent dac000d commit e42dcd7
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
461 | | - | |
| 461 | + | |
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1086 | 1086 | | |
1087 | 1087 | | |
1088 | 1088 | | |
1089 | | - | |
1090 | | - | |
| 1089 | + | |
| 1090 | + | |
1091 | 1091 | | |
1092 | 1092 | | |
1093 | 1093 | | |
| |||
0 commit comments