nercone-shell 0.2.1__tar.gz → 0.2.3__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.1
3
+ Version: 0.2.3
4
4
  Summary: Modern shell for Developers
5
5
  Author: Nercone
6
6
  Author-email: Nercone <nercone@diamondgotcat.net>
@@ -8,6 +8,7 @@ License: MIT
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: License :: OSI Approved :: MIT License
10
10
  Classifier: Operating System :: OS Independent
11
+ Requires-Dist: nercone-modern
11
12
  Requires-Python: >=3.8
12
13
  Description-Content-Type: text/markdown
13
14
 
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "nercone-shell"
7
- version = "0.2.1"
7
+ version = "0.2.3"
8
8
  description = "Modern shell for Developers"
9
9
  readme = { file = "README.md", content-type = "text/markdown" }
10
10
  authors = [
@@ -12,7 +12,9 @@ authors = [
12
12
  ]
13
13
  license = { text = "MIT" }
14
14
  requires-python = ">=3.8"
15
- dependencies = []
15
+ dependencies = [
16
+ "nercone-modern"
17
+ ]
16
18
  classifiers = [
17
19
  "Programming Language :: Python :: 3",
18
20
  "License :: OSI Approved :: MIT License",
@@ -31,6 +31,7 @@ NERSH_HISTORY_PATH = Path(os.environ.get("NERSH_HISTORY_PATH", str(Path(NERSH_PA
31
31
  NERSH_CONFIG: dict = {}
32
32
  NERSH_CONFIG_PATH = Path(os.environ.get("NERSH_CONFIG_PATH", str(Path(NERSH_PATH, "config.json"))))
33
33
  NERSH_CONFIG_DEFAULT: dict = {
34
+ "show_version": True,
34
35
  "override_env": {
35
36
  "SHELL": f"{shutil.which('nersh')}"
36
37
  },
@@ -146,6 +147,9 @@ def shorten_path(path: str) -> str:
146
147
  return f"/{path_str}"
147
148
  return path_str
148
149
 
150
+ def show_version():
151
+ print(f"Nersh v{VERSION}")
152
+
149
153
  def reset():
150
154
  global ENVIRONMENT, NERSH_CONFIG
151
155
  ENVIRONMENT = {"PWD": f"{Path(Path("~").expanduser())}"}
@@ -181,7 +185,7 @@ def run_line(command: str) -> int:
181
185
  args = command.strip().split(" ")
182
186
  cmd = args[0]
183
187
  if cmd == "version":
184
- print(f"Nersh v{VERSION}")
188
+ show_version()
185
189
  elif cmd == "cd":
186
190
  target = " ".join(args[1:])
187
191
  if not target:
@@ -254,7 +258,9 @@ def main() -> int:
254
258
  else:
255
259
  readline.parse_and_bind("tab: complete")
256
260
  readline.set_completer_delims(' \t\n;')
257
- for p in NERSH_CONFIG.get("autoruns"):
261
+ if NERSH_CONFIG.get("show_version", True):
262
+ show_version()
263
+ for p in NERSH_CONFIG.get("autoruns", []):
258
264
  if Path(p).is_file():
259
265
  with Path(p).open("r") as f:
260
266
  run_script(f.read())
File without changes