Repository navigation
Releases
Releases · mvsoares/synth-shell-theme
v1.4.0 — Security Hardening, Locale/Bash Fixes & Web Studio Parity
What's New in v1.4.0
Security Hardening
- Bash Double-Quote Escaping & Color Validation:
_escape_bash_dq()now strips CR/LF and escapes\,",$, and`(with matching unescape in_unquote()), preventing command injection insynth-shell-prompt.configwhile preserving literal$prefixes.save_custom_theme()strictly validates color tokens and sanitizes comment headers. - Web Studio CSRF & Path Confinement:
POSTendpoints now enforceContent-Type: application/json, same-originOrigin, andSec-Fetch-Siteheaders, and/api/export-starshiprestricts output to.tomlfiles inside the config directory or~/.config.
Bug Fixes & Performance
- Non-English Locale
$EPOCHREALTIMEFix (pt_BR.UTF-8/ European): Replaced${EPOCHREALTIME/./}with${EPOCHREALTIME/[.,]/}inPS0,_ssp_format_duration_var, andbenchmark_promptso command durations and--notify-secnotifications work accurately under comma-decimal locales. - Zero-Fork Git Config Check &
NAME_MAX-Safe Async Cache: Reads.git/configin pure Bash before invokinggit config, eliminating an extra subprocess fork on every prompt, and hashes deep paths (>180 chars) inSSP_GIT_ASYNC_CACHE. - Emoji-Aware
RPROMPTWidth & Bash 3.2 Regex: Added_ssp_vis_width_varfor 2-column emojis inRPROMPTalignment, Bash 3.2-safe_rematching ingetKube(), andEUID != 0guard ingetSudo(). - Complete Exports, Root Sync & SSH Deploy: Added missing v1.2+ fields to
export_preset(), synced all 24 segments insync_root_config(), fixed stray spacing and conditional separators inexport_starship_toml(), and applied fullASCII_SAFE_GIT_SYMBOLS+ pure-Bash.bashrchook inssh-install.
Web Studio & Theme Polish
- Propagated
config_diracross allload_themes()calls and fixed# Theme: Nameheader detection for custom user themes. - Unified Apply Studio Selection to persist all layout/DevOps settings, added perceptual auto-contrast in the Custom Theme Creator, guarded all buttons in static GitHub Pages demo mode (
docs/index.html), and improved Host text contrast on theme#02.
v1.3.9 — Smart DevOps Safety, Modern Terminal Superpowers & SSH/WezTerm/Starship Ecosystem
Highlights in v1.3.9
1. Smart DevOps Safety & Dynamic Context Colors
- Kubernetes Namespace + 🚨 Production Warning (
kube_namespace_prod): Pure-Bash$KUBECONFIGparser extracts bothcurrent-contextand activenamespace(☸ prod-cluster (payments)) and automatically highlights production contexts/namespaces (--kube-prod-pattern) in vibrant red with🚨. - Dynamic Git Segment Colors (
--git-dynamic-color): Automatically colorsGITamber when dirty and red duringREBASE/MERGE/CHERRY/BISECTwith seamless Powerline separator matching. - Deterministic SSH Hostname Colors (
--ssh-host-color): Hashes$HOSTNAMEinto a readable 256-color palette over SSH, with automatic red (prod) and amber (stg/uat/qa) rules. - New Segments (
SUDO,JJ,CUSTOM) — 24 Total Segments: Cachedsudocredential badge, zero-fork Jujutsu (.jj) VCS detection, and user-definedCUSTOMbadge (--custom-badge/$SYNTH_CUSTOM_BADGE).
2. Modern Terminal Superpowers
- OSC 7 CWD Reporting (
--osc7, default on): Pure-Bash URL-encoded OSC 7 so WezTerm, Ghostty, Kitty, and Windows Terminal open new tabs & splits in the active directory. - Native Long-Command Desktop Notifications (
--notify-sec): Emits OSC 9 / OSC 99 desktop notifications when slow builds or deploys finish. - OS Dark/Light Auto-Theme (
--auto-theme): Detects GNOME/KDE, macOSdefaults, and Windows Registry color scheme automatically. - Fish-Style Path Abbreviation (
--pwd-style fish): Pure-Bash~/p/synth-shell-themeshortening. - Includes all
v1.3.0–v1.3.3improvements: Right-aligned top bar (RPROMPT), OSC 133 semantic markers (BEL\aterminated), automatic SSH/TUI mouse-tracking sanitizer (terminal_sanitize), full macOS Bash 3.2 compatibility, drag-and-drop Web Studio, inline color editing,doctor --fix, and static GitHub Pages demo.
3. Ecosystem, Portability & 1-Command SSH Deploy
- 1-Command Remote SSH Deploy (
synth-shell-theme ssh-install user@host): Installs your patchedsynth-shell-prompt.sh+ config over a single SSH stream with zero Python or Git required remotely. - WezTerm + Starship Integration:
--sync-ecosystemnow generateswezterm-theme.luaalongsidetheme-env.sh(FZF_DEFAULT_OPTS+LS_COLORS) andtmux-theme.conf;export-starshipexports any theme + dual separators tostarship.toml.
Credits & Inspiration
Inspired by andresgongora/synth-shell, community requests from GitHub Issues, Reddit (r/commandline, r/unixporn, r/bash, r/devops), StackOverflow, Starship, Powerlevel10k, Oh My Posh, Fish, Jujutsu, Pywal, Base16, and modern OSC 7/9/99/133 terminal specifications.
Upgrade / Install
pipx install synth-shell-theme --force
synth-shell-theme init --no-tunev1.0.0 — Synth-Shell Theme Studio
Highlights
- 64 Curated 256-Color Prompt Themes with category badges, descriptions,
--force-white-text, and--keep-input. - Dual Powerline Separator Editor (
synth-shell-separator/synth-shell-theme sep) with 48 presets across 6 categories + 60+ Nerd Font Character Matrix. - Live Browser Web Studio (
synth-shell-theme web,127.0.0.1:7778) with sticky live prompt workbench, category filters, segment layout controls, and 1-click apply. - 4 Idempotent Runtime & Speed Patches (
synth-shell-theme init): zero-subshell Kubernetes context (kube_fast), single-pass Git status (git_single_pass, 4x faster), independent ending separator (dual_separator), and full 0-255 color parity (color_256_parity). - Zero External Dependencies — 100% Python
>= 3.10standard library, tested across Linux, macOS, and Windows.