xmyshell 0.2.14__tar.gz → 0.2.16__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.
- {xmyshell-0.2.14/xmyshell.egg-info → xmyshell-0.2.16}/PKG-INFO +1 -1
- {xmyshell-0.2.14 → xmyshell-0.2.16}/pyproject.toml +1 -1
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/completer.py +7 -4
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/data/commands.json +990 -50
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/kernel.py +0 -18
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/lexer.py +1 -1
- {xmyshell-0.2.14 → xmyshell-0.2.16/xmyshell.egg-info}/PKG-INFO +1 -1
- {xmyshell-0.2.14 → xmyshell-0.2.16}/LICENSE +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/README.md +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/setup.cfg +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/__init__.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/__main__.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/environment.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/init.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/injection.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/keybindings.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/main.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/meta.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/stubs/__init__.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/stubs/__init__.pyi +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/stubs/py.typed +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/themes.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/update.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/utils.py +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/SOURCES.txt +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/dependency_links.txt +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/entry_points.txt +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/requires.txt +0 -0
- {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/top_level.txt +0 -0
|
@@ -341,7 +341,10 @@ class ShellCompleter(Completer):
|
|
|
341
341
|
yield from self._environment_completion(text)
|
|
342
342
|
|
|
343
343
|
def _subcommand_completion(self, text: str):
|
|
344
|
-
|
|
344
|
+
try:
|
|
345
|
+
parts = shlex.split(text)
|
|
346
|
+
except ValueError:
|
|
347
|
+
parts = text.split()
|
|
345
348
|
if not parts: return
|
|
346
349
|
sub_cmd = COMMAND_TREE.get(parts[0])
|
|
347
350
|
if not sub_cmd: return
|
|
@@ -365,7 +368,7 @@ class ShellCompleter(Completer):
|
|
|
365
368
|
|
|
366
369
|
for name in sorted(sub_cmd.keys()):
|
|
367
370
|
if name == "_global" or name == "_flags": continue
|
|
368
|
-
if name in parts: continue
|
|
371
|
+
if name in parts[:-1]: continue
|
|
369
372
|
if name.startswith(last_word):
|
|
370
373
|
yield Completion(
|
|
371
374
|
name,
|
|
@@ -375,7 +378,7 @@ class ShellCompleter(Completer):
|
|
|
375
378
|
)
|
|
376
379
|
|
|
377
380
|
for name in sorted(sub_cmd.get("_flags") or set()):
|
|
378
|
-
if name in parts: continue
|
|
381
|
+
if name in parts[:-1]: continue
|
|
379
382
|
if name.startswith(last_word):
|
|
380
383
|
yield Completion(
|
|
381
384
|
name,
|
|
@@ -385,7 +388,7 @@ class ShellCompleter(Completer):
|
|
|
385
388
|
)
|
|
386
389
|
|
|
387
390
|
for name in sorted(global_flags):
|
|
388
|
-
if name in parts: continue
|
|
391
|
+
if name in parts[:-1]: continue
|
|
389
392
|
if name.startswith(last_word):
|
|
390
393
|
yield Completion(
|
|
391
394
|
name,
|