nercone-shell 0.2.5__tar.gz → 0.2.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: nercone-shell
3
- Version: 0.2.5
3
+ Version: 0.2.7
4
4
  Summary: Modern shell for Developers
5
5
  Author: Nercone
6
6
  Author-email: Nercone <nercone@diamondgotcat.net>
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "nercone-shell"
7
- version = "0.2.5"
7
+ version = "0.2.7"
8
8
  description = "Modern shell for Developers"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  authors = [
@@ -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
+ color_green = f"{RL_PROMPT_START_IGNORE}{ModernColor.color('green')}{RL_PROMPT_END_IGNORE}"
281
+ color_reset = f"{RL_PROMPT_START_IGNORE}{ModernColor.color('reset')}{RL_PROMPT_END_IGNORE}"
278
282
  while True:
279
283
  try:
280
- print(f"{ModernColor.color('green')}{getpass.getuser()}{ModernColor.color('reset')}@{os.uname()[1].rsplit('.', 1)[0]} {ModernColor.color('green')}{shorten_path(ENVIRONMENT.get('PWD', f'{Path('~').expanduser()}'))}{ModernColor.color('reset')}> ", end="")
281
- run_line(input())
284
+ run_line(input(f"{color_green}{getpass.getuser()}{color_reset}@{os.uname()[1].rsplit('.', 1)[0]} {color_green}{shorten_path(ENVIRONMENT.get('PWD', f'{Path('~').expanduser()}'))}{color_reset}> "))
282
285
  except KeyboardInterrupt:
283
286
  print()
284
287
  continue
File without changes