FEAT: added colored prompts, a right aligned prompt and minimal history to Bsh

This commit is contained in:
boreddevnl
2026-04-17 13:09:51 +02:00
parent 0a8f913045
commit 9357f82d17
2 changed files with 216 additions and 67 deletions

View File

@@ -19,9 +19,21 @@ BOOT_SCRIPT=/Library/bsh/boot.bsh
# %h = hostname
# %~ = cwd ("~" for /root)
# %T = time (HH:MM)
PROMPT_LEFT=%n@%h:%~$
# Colors:
# %{color} switches text color; use names or hex.
# Names: default, red, green, yellow, blue, magenta, cyan, white, gray
# Hex: #RRGGBB, 0xRRGGBB, or 0xAARRGGBB
PROMPT_LEFT=%{green}%n@%h%{default}:%~%{blue}$%{default}
PROMPT_RIGHT=%T
# Minimal history mode
# When enabled, the entered line is rewritten as PROMPT_MINIMAL_PREFIX + command.
# Example:
# root@boredos:~$ echo hi
# > echo hi
PROMPT_MINIMAL_HISTORY=true
PROMPT_MINIMAL_PREFIX="> "
# History settings.
HISTORY_FILE=/Library/bsh/history
HISTORY_SIZE=200
@@ -31,5 +43,3 @@ GLOB=true
COMPLETE=true
SUGGEST=true
# Example aliases (future support).
# alias ll=ls -la