xmyshell 0.2.15__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.15/xmyshell.egg-info → xmyshell-0.2.16}/PKG-INFO +1 -1
  2. {xmyshell-0.2.15 → xmyshell-0.2.16}/pyproject.toml +1 -1
  3. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/kernel.py +0 -18
  4. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/lexer.py +1 -1
  5. {xmyshell-0.2.15 → xmyshell-0.2.16/xmyshell.egg-info}/PKG-INFO +1 -1
  6. {xmyshell-0.2.15 → xmyshell-0.2.16}/LICENSE +0 -0
  7. {xmyshell-0.2.15 → xmyshell-0.2.16}/README.md +0 -0
  8. {xmyshell-0.2.15 → xmyshell-0.2.16}/setup.cfg +0 -0
  9. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/__init__.py +0 -0
  10. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/__main__.py +0 -0
  11. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/completer.py +0 -0
  12. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/data/commands.json +0 -0
  13. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/environment.py +0 -0
  14. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/init.py +0 -0
  15. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/injection.py +0 -0
  16. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/keybindings.py +0 -0
  17. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/main.py +0 -0
  18. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/meta.py +0 -0
  19. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/stubs/__init__.py +0 -0
  20. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/stubs/__init__.pyi +0 -0
  21. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/stubs/py.typed +0 -0
  22. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/themes.py +0 -0
  23. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/update.py +0 -0
  24. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/utils.py +0 -0
  25. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell.egg-info/SOURCES.txt +0 -0
  26. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell.egg-info/dependency_links.txt +0 -0
  27. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell.egg-info/entry_points.txt +0 -0
  28. {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell.egg-info/requires.txt +0 -0
  29. {xmyshell-0.2.15 → 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.15
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.15"
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"
@@ -232,22 +232,6 @@ def xmyshell_raw_command(cmd_line: str) -> int | None:
232
232
  pyerror(f"{type(e).__name__}: {e}")
233
233
  return -1
234
234
 
235
- def _fix_first_word(cmd_line: str) -> str:
236
- # strip is unnecessary
237
- if cmd_line.startswith('"'):
238
- end = cmd_line.find('"', 1)
239
- if end == -1:
240
- return cmd_line
241
- first = cmd_line[:end + 1]
242
- rest = cmd_line[end + 1:]
243
- else:
244
- parts = cmd_line.split(None, 1)
245
- first = parts[0]
246
- rest = (" " + parts[1]) if len(parts) > 1 else ""
247
-
248
- fixed = first.replace("/", "\\")
249
- return fixed + rest
250
-
251
235
 
252
236
  def xmyshell(cmd_line: str) -> int:
253
237
  cmd_line = cmd_line.strip()
@@ -361,8 +345,6 @@ def xmyshell(cmd_line: str) -> int:
361
345
  pyerror(f"source error: {e}")
362
346
  return -1
363
347
 
364
- if os.name == "nt":
365
- cmd_line = _fix_first_word(cmd_line)
366
348
  if target_var:
367
349
  result = _run(
368
350
  cmd_line, env=os.environ, capture_output=True, text=True
@@ -227,7 +227,7 @@ def _lex_line(line: str) -> list[tuple[str, str]]:
227
227
  leading_spaces = line[:len(line) - len(line.lstrip())]
228
228
  _splited = line.lstrip().split(None, 1)
229
229
  _cmd = _splited[0] if _splited else ""
230
- if _cmd in ["pyexec", "print"]:
230
+ if _cmd in ["pyexec", "print", "pwd", "help"]:
231
231
  sh_cmd = None
232
232
  if "|>" in line:
233
233
  line, sh_cmd = line.split("|>", 1)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: xmyshell
3
- Version: 0.2.15
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
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