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.
Files changed (29) hide show
  1. {xmyshell-0.2.14/xmyshell.egg-info → xmyshell-0.2.16}/PKG-INFO +1 -1
  2. {xmyshell-0.2.14 → xmyshell-0.2.16}/pyproject.toml +1 -1
  3. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/completer.py +7 -4
  4. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/data/commands.json +990 -50
  5. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/kernel.py +0 -18
  6. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/lexer.py +1 -1
  7. {xmyshell-0.2.14 → xmyshell-0.2.16/xmyshell.egg-info}/PKG-INFO +1 -1
  8. {xmyshell-0.2.14 → xmyshell-0.2.16}/LICENSE +0 -0
  9. {xmyshell-0.2.14 → xmyshell-0.2.16}/README.md +0 -0
  10. {xmyshell-0.2.14 → xmyshell-0.2.16}/setup.cfg +0 -0
  11. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/__init__.py +0 -0
  12. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/__main__.py +0 -0
  13. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/environment.py +0 -0
  14. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/init.py +0 -0
  15. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/injection.py +0 -0
  16. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/keybindings.py +0 -0
  17. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/main.py +0 -0
  18. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/meta.py +0 -0
  19. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/stubs/__init__.py +0 -0
  20. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/stubs/__init__.pyi +0 -0
  21. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/stubs/py.typed +0 -0
  22. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/themes.py +0 -0
  23. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/update.py +0 -0
  24. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell/utils.py +0 -0
  25. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/SOURCES.txt +0 -0
  26. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/dependency_links.txt +0 -0
  27. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/entry_points.txt +0 -0
  28. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/requires.txt +0 -0
  29. {xmyshell-0.2.14 → xmyshell-0.2.16}/xmyshell.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xmyshell
3
- Version: 0.2.14
3
+ Version: 0.2.16
4
4
  Summary: XmyShell is a shell-like tool built on top of prompt_toolkit which provides a persistent Python runtime.
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "xmyshell"
3
- version = "0.2.14"
3
+ version = "0.2.16"
4
4
  description = "XmyShell is a shell-like tool built on top of prompt_toolkit which provides a persistent Python runtime."
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -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
- parts = text.split()
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,