nercone-shell 0.2.3__py3-none-any.whl → 0.2.4__py3-none-any.whl

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/__main__.py CHANGED
@@ -17,7 +17,6 @@ import readline
17
17
  import subprocess
18
18
  from pathlib import Path
19
19
  from nercone_modern.color import ModernColor
20
- from nercone_modern.text import ModernText
21
20
  from importlib.metadata import version, PackageNotFoundError
22
21
 
23
22
  try:
@@ -186,6 +185,10 @@ def run_line(command: str) -> int:
186
185
  cmd = args[0]
187
186
  if cmd == "version":
188
187
  show_version()
188
+ elif cmd == "reset":
189
+ reset()
190
+ elif cmd == "reload":
191
+ reload()
189
192
  elif cmd == "cd":
190
193
  target = " ".join(args[1:])
191
194
  if not target:
@@ -274,8 +277,7 @@ def main() -> int:
274
277
  readline.read_history_file(NERSH_HISTORY_PATH)
275
278
  while True:
276
279
  try:
277
- command = input(f"{ModernColor.GREEN}{getpass.getuser()}{ModernColor.RESET}@{os.uname()[1].rsplit('.', 1)[0]} {ModernColor.GREEN}{shorten_path(ENVIRONMENT.get('PWD', f'{Path('~').expanduser()}'))}{ModernColor.RESET}> ")
278
- run_line(command)
280
+ run_line(input(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')}> "))
279
281
  except KeyboardInterrupt:
280
282
  print()
281
283
  continue
@@ -0,0 +1,62 @@
1
+ Metadata-Version: 2.3
2
+ Name: nercone-shell
3
+ Version: 0.2.4
4
+ Summary: Modern shell for Developers
5
+ Author: Nercone
6
+ Author-email: Nercone <nercone@diamondgotcat.net>
7
+ License: MIT
8
+ Classifier: Programming Language :: Python :: 3
9
+ Classifier: License :: OSI Approved :: MIT License
10
+ Classifier: Operating System :: OS Independent
11
+ Requires-Dist: nercone-modern
12
+ Requires-Python: >=3.8
13
+ Description-Content-Type: text/markdown
14
+
15
+
16
+ <img width="1710" alt="Screenshot" src="https://github.com/user-attachments/assets/a717ebd3-c9d4-447c-86a5-7d33eea9c028" />
17
+
18
+ # Nersh (Nercone Shell)
19
+ Modern shell for Developers
20
+
21
+ ## Requiments
22
+ - CPython 3.9+
23
+ - `uv` [PyPI↗︎](https://pypi.org/project/uv/) or `pip3` [PyPI↗︎](https://pypi.org/project/pip/)
24
+ - `nercone-modern` [PyPI↗︎](https://pypi.org/project/nercone-modern/)
25
+
26
+ ## Installation
27
+
28
+ ### using uv (recommended)
29
+ ```
30
+ uv tool install nercone-shell
31
+ ```
32
+
33
+ ### using pip3
34
+
35
+ **System Python:**
36
+ ```
37
+ pip3 install nercone-shell --break-system-packages
38
+ ```
39
+
40
+ **Venv Python:**
41
+ ```
42
+ pip3 install nercone-shell
43
+ ```
44
+
45
+ ## Update
46
+
47
+ ### using uv (recommended)
48
+ ```
49
+ uv tool install nercone-shell --upgrade
50
+ ```
51
+
52
+ ### using pip3
53
+
54
+ **System Python:**
55
+ ```
56
+ pip3 install nercone-shell --upgrade --break-system-packages
57
+ ```
58
+
59
+ **Venv Python:**
60
+ ```
61
+ pip3 install nercone-shell --upgrade
62
+ ```
@@ -0,0 +1,6 @@
1
+ nercone_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ nercone_shell/__main__.py,sha256=d9hf5f4JhIdoaeuog2UJj0E4ohAJQv3Nz2VHDgtDqA4,9754
3
+ nercone_shell-0.2.4.dist-info/WHEEL,sha256=YUH1mBqsx8Dh2cQG2rlcuRYUhJddG9iClegy4IgnHik,79
4
+ nercone_shell-0.2.4.dist-info/entry_points.txt,sha256=STrGlvrPc2Rr5ktWVfiZ_5Lr7i1GcfOMvsTxL6768sw,55
5
+ nercone_shell-0.2.4.dist-info/METADATA,sha256=rzhryGJXTZGYfq7v00mw6uP6KWuYgA5s0B0tKtnJA0o,1286
6
+ nercone_shell-0.2.4.dist-info/RECORD,,
@@ -1,16 +0,0 @@
1
- Metadata-Version: 2.3
2
- Name: nercone-shell
3
- Version: 0.2.3
4
- Summary: Modern shell for Developers
5
- Author: Nercone
6
- Author-email: Nercone <nercone@diamondgotcat.net>
7
- License: MIT
8
- Classifier: Programming Language :: Python :: 3
9
- Classifier: License :: OSI Approved :: MIT License
10
- Classifier: Operating System :: OS Independent
11
- Requires-Dist: nercone-modern
12
- Requires-Python: >=3.8
13
- Description-Content-Type: text/markdown
14
-
15
- # Nersh (Nercone Shell)
16
- Modern shell for Developers
@@ -1,6 +0,0 @@
1
- nercone_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- nercone_shell/__main__.py,sha256=HKRtx6fZAYaqBNuPMvI5D3alAE1YNMCPBBtMXXllhck,9707
3
- nercone_shell-0.2.3.dist-info/WHEEL,sha256=YUH1mBqsx8Dh2cQG2rlcuRYUhJddG9iClegy4IgnHik,79
4
- nercone_shell-0.2.3.dist-info/entry_points.txt,sha256=STrGlvrPc2Rr5ktWVfiZ_5Lr7i1GcfOMvsTxL6768sw,55
5
- nercone_shell-0.2.3.dist-info/METADATA,sha256=5V-Dxb9Zx9l8fXlZiPNd6FlOsHfd3xI-EqVDHpSO5sE,465
6
- nercone_shell-0.2.3.dist-info/RECORD,,