nercone-shell 0.2.5__tar.gz → 0.2.6__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.
- {nercone_shell-0.2.5 → nercone_shell-0.2.6}/PKG-INFO +1 -1
- {nercone_shell-0.2.5 → nercone_shell-0.2.6}/pyproject.toml +1 -1
- {nercone_shell-0.2.5 → nercone_shell-0.2.6}/src/nercone_shell/__main__.py +5 -2
- {nercone_shell-0.2.5 → nercone_shell-0.2.6}/README.md +0 -0
- {nercone_shell-0.2.5 → nercone_shell-0.2.6}/src/nercone_shell/__init__.py +0 -0
|
@@ -275,10 +275,13 @@ def main() -> int:
|
|
|
275
275
|
run_script(NERSH_AUTORUN)
|
|
276
276
|
if NERSH_HISTORY_PATH.is_file():
|
|
277
277
|
readline.read_history_file(NERSH_HISTORY_PATH)
|
|
278
|
+
RL_PROMPT_START_IGNORE = '\001'
|
|
279
|
+
RL_PROMPT_END_IGNORE = '\002'
|
|
280
|
+
green = f"{RL_PROMPT_START_IGNORE}{ModernColor.color('green')}{RL_PROMPT_END_IGNORE}"
|
|
281
|
+
reset = f"{RL_PROMPT_START_IGNORE}{ModernColor.color('reset')}{RL_PROMPT_END_IGNORE}"
|
|
278
282
|
while True:
|
|
279
283
|
try:
|
|
280
|
-
|
|
281
|
-
run_line(input())
|
|
284
|
+
run_line(input(f"{green}{getpass.getuser()}{reset}@{os.uname()[1].rsplit('.', 1)[0]} {green}{shorten_path(ENVIRONMENT.get('PWD', f'{Path('~').expanduser()}'))}{reset}> "))
|
|
282
285
|
except KeyboardInterrupt:
|
|
283
286
|
print()
|
|
284
287
|
continue
|
|
File without changes
|
|
File without changes
|