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.
- {xmyshell-0.2.15/xmyshell.egg-info → xmyshell-0.2.16}/PKG-INFO +1 -1
- {xmyshell-0.2.15 → xmyshell-0.2.16}/pyproject.toml +1 -1
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/kernel.py +0 -18
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/lexer.py +1 -1
- {xmyshell-0.2.15 → xmyshell-0.2.16/xmyshell.egg-info}/PKG-INFO +1 -1
- {xmyshell-0.2.15 → xmyshell-0.2.16}/LICENSE +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/README.md +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/setup.cfg +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/__init__.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/__main__.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/completer.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/data/commands.json +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/environment.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/init.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/injection.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/keybindings.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/main.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/meta.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/stubs/__init__.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/stubs/__init__.pyi +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/stubs/py.typed +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/themes.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/update.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell/utils.py +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell.egg-info/SOURCES.txt +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell.egg-info/dependency_links.txt +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell.egg-info/entry_points.txt +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell.egg-info/requires.txt +0 -0
- {xmyshell-0.2.15 → xmyshell-0.2.16}/xmyshell.egg-info/top_level.txt +0 -0
|
@@ -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)
|
|
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
|
|
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
|