wizlib 2.0.17__tar.gz → 2.0.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of wizlib might be problematic. Click here for more details.
- {wizlib-2.0.17 → wizlib-2.0.19}/PKG-INFO +1 -1
- {wizlib-2.0.17 → wizlib-2.0.19}/pyproject.toml +1 -1
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/ui/shell_line_editor.py +2 -1
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/ui/shell_ui.py +4 -4
- {wizlib-2.0.17 → wizlib-2.0.19}/README.md +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/__init__.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/app.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/class_family.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/command.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/config_handler.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/error.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/handler.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/input_handler.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/parser.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/rlinput.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/super_wrapper.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/ui/__init__.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/ui_handler.py +0 -0
- {wizlib-2.0.17 → wizlib-2.0.19}/wizlib/util.py +0 -0
|
@@ -70,6 +70,7 @@ FAINT = ESC + "[2m"
|
|
|
70
70
|
BOLD = ESC + "[1m"
|
|
71
71
|
|
|
72
72
|
WORD_SEPARATORS = ' -_.,'
|
|
73
|
+
SPACE = ' '
|
|
73
74
|
|
|
74
75
|
|
|
75
76
|
def write(key):
|
|
@@ -227,7 +228,7 @@ class ShellLineEditor: # pragma: nocover
|
|
|
227
228
|
@property
|
|
228
229
|
def last_word(self):
|
|
229
230
|
index = next((c for c in reversed(range(len(self.buf)))
|
|
230
|
-
if self.buf[c]
|
|
231
|
+
if self.buf[c] == SPACE), -1)
|
|
231
232
|
return self.buf[index+1:]
|
|
232
233
|
|
|
233
234
|
@property
|
|
@@ -33,10 +33,10 @@ class ShellUI(UI):
|
|
|
33
33
|
print(file=sys.stderr, flush=True)
|
|
34
34
|
return chooser.choice_by_key(key)
|
|
35
35
|
|
|
36
|
-
def get_text(self, prompt):
|
|
37
|
-
"""Allow the user to input an arbitrary line of text
|
|
36
|
+
def get_text(self, prompt='', choices=[], default=''):
|
|
37
|
+
"""Allow the user to input an arbitrary line of text, with possible tab
|
|
38
|
+
completion"""
|
|
38
39
|
sys.stderr.write(prompt)
|
|
39
40
|
sys.stderr.flush()
|
|
40
|
-
value = ShellLineEditor().edit()
|
|
41
|
-
# value = input()
|
|
41
|
+
value = ShellLineEditor(choices, default).edit()
|
|
42
42
|
return value
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|