Bugzilla – Attachment 1203 Details for
Bug 8370
tab completing input to squashed short options is unreliable
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Disable completion for unidentified options
disable_completing_squashed_shortopts.patch (text/plain), 825 bytes, created by
Tobias
on 2024-06-20 09:42:57 CEST
(
hide
)
Description:
Disable completion for unidentified options
Filename:
MIME Type:
Creator:
Tobias
Created:
2024-06-20 09:42:57 CEST
Size:
825 bytes
patch
obsolete
>diff --git a/tlmisc/optcomplete/optcomplete.py b/tlmisc/optcomplete/optcomplete.py >index 9b2ff730c..1f5b66344 100644 >--- a/tlmisc/optcomplete/optcomplete.py >+++ b/tlmisc/optcomplete/optcomplete.py >@@ -351,6 +351,15 @@ def autocomplete( parser, > raise SystemExit( > "Error: optparse option with a completer " > "does not take arguments: %s" % str(option)) >+ >+ # Prev starts with '-' but no corresponding option could be >+ # identified. This is likely due to squashed short opts as in -a -b >+ # -c -> -abc, in which case we don't try to complete since it's not >+ # unambiguous which option completer to use. >+ elif not option: >+ sys.exit(exit_code) >+ >+ > except KeyError: > pass >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 8370
: 1203 |
1204