nercone-shell 0.2.8__py3-none-any.whl → 0.3.0__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
@@ -32,6 +32,7 @@ NERSH_CONFIG_PATH = Path(os.environ.get("NERSH_CONFIG_PATH", str(Path(NERSH_PATH
32
32
  NERSH_CONFIG_DEFAULT: dict = {
33
33
  "customization": {
34
34
  "show_version": True,
35
+ "accent_color": "blue",
35
36
  "override_env": {
36
37
  "SHELL": f"{shutil.which('nersh')}"
37
38
  },
@@ -284,11 +285,11 @@ def main() -> int:
284
285
  readline.read_history_file(NERSH_HISTORY_PATH)
285
286
  RL_PROMPT_START_IGNORE = "\001" if NERSH_CONFIG.get("compatibility", {}).get("report_invisible_characters", False) else ""
286
287
  RL_PROMPT_END_IGNORE = "\002" if NERSH_CONFIG.get("compatibility", {}).get("report_invisible_characters", False) else ""
287
- color_green = f"{RL_PROMPT_START_IGNORE}{ModernColor.color('green')}{RL_PROMPT_END_IGNORE}"
288
+ color_accent = f"{RL_PROMPT_START_IGNORE}{NERSH_CONFIG.get('customization', {}).get('accent_color', 'blue')}{RL_PROMPT_END_IGNORE}"
288
289
  color_reset = f"{RL_PROMPT_START_IGNORE}{ModernColor.color('reset')}{RL_PROMPT_END_IGNORE}"
289
290
  while True:
290
291
  try:
291
- 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}> "))
292
+ run_line(input(f"{color_accent}{getpass.getuser()}{color_reset}@{os.uname()[1].rsplit('.', 1)[0]} {color_accent}{shorten_path(ENVIRONMENT.get('PWD', f'{Path('~').expanduser()}'))}{color_reset}> "))
292
293
  except KeyboardInterrupt:
293
294
  print()
294
295
  continue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: nercone-shell
3
- Version: 0.2.8
3
+ Version: 0.3.0
4
4
  Summary: Modern shell for Developers
5
5
  Author: Nercone
6
6
  Author-email: Nercone <nercone@diamondgotcat.net>
@@ -61,6 +61,11 @@ pip3 install nercone-shell --upgrade --break-system-packages
61
61
  pip3 install nercone-shell --upgrade
62
62
  ```
63
63
 
64
+ ## Usage
65
+ ```
66
+ nersh
67
+ ```
68
+
64
69
  ## Configuration
65
70
  The configuration file is usually located at `~/.nercone/nercone-shell/config.json`.
66
71
  If the file does not exist when Nersh starts, it will be automatically created.
@@ -70,6 +75,7 @@ The following is the default configuration file:
70
75
  {
71
76
  "customization": {
72
77
  "show_version": true,
78
+ "accent_color": "blue",
73
79
  "override_env": {
74
80
  "SHELL": "None"
75
81
  },
@@ -86,6 +92,7 @@ The following is the default configuration file:
86
92
  ### Customization
87
93
  These settings customize the behavior of Nersh.
88
94
  - `show_version`: Sets whether to display version information at startup.
95
+ - `accent_color`: Accent color used for prompts etc.
89
96
  - `override_env`: Sets the environment variables you want to set at startup in dictionary format.
90
97
  - `autoruns`: Sets the shell scripts you want to run at startup in array format.
91
98
 
@@ -0,0 +1,6 @@
1
+ nercone_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ nercone_shell/__main__.py,sha256=2LDSGJOMu3Bc5Ja2d9cB7jApUlaNEYdmp-51YNwDqEk,10509
3
+ nercone_shell-0.3.0.dist-info/WHEEL,sha256=YUH1mBqsx8Dh2cQG2rlcuRYUhJddG9iClegy4IgnHik,79
4
+ nercone_shell-0.3.0.dist-info/entry_points.txt,sha256=STrGlvrPc2Rr5ktWVfiZ_5Lr7i1GcfOMvsTxL6768sw,55
5
+ nercone_shell-0.3.0.dist-info/METADATA,sha256=mqXJA5zF2cT_vSsBdgBaG11nHo0oOOdxZx9OjhZEGLQ,2547
6
+ nercone_shell-0.3.0.dist-info/RECORD,,
@@ -1,6 +0,0 @@
1
- nercone_shell/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- nercone_shell/__main__.py,sha256=NSz6WNnNFaglY2x2E0-lacZXHhMVUpd1kVYLtNtvLKM,10435
3
- nercone_shell-0.2.8.dist-info/WHEEL,sha256=YUH1mBqsx8Dh2cQG2rlcuRYUhJddG9iClegy4IgnHik,79
4
- nercone_shell-0.2.8.dist-info/entry_points.txt,sha256=STrGlvrPc2Rr5ktWVfiZ_5Lr7i1GcfOMvsTxL6768sw,55
5
- nercone_shell-0.2.8.dist-info/METADATA,sha256=waPwLosYQ2ilAlBP2_QMxdeliMHbOpcLv8AD7aM4H64,2438
6
- nercone_shell-0.2.8.dist-info/RECORD,,