Skip to content

Releases

v1.4.0 — Security Hardening, Locale/Bash Fixes & Web Studio Parity

Choose a tag to compare

@mvsoares mvsoares released this 24 Nov 00:12

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 in synth-shell-prompt.config while preserving literal $ prefixes. save_custom_theme() strictly validates color tokens and sanitizes comment headers.
  • Web Studio CSRF & Path Confinement: POST endpoints now enforce Content-Type: application/json, same-origin Origin, and Sec-Fetch-Site headers, and /api/export-starship restricts output to .toml files inside the config directory or ~/.config.

Bug Fixes & Performance

  • Non-English Locale $EPOCHREALTIME Fix (pt_BR.UTF-8 / European): Replaced ${EPOCHREALTIME/./} with ${EPOCHREALTIME/[.,]/} in PS0, _ssp_format_duration_var, and benchmark_prompt so command durations and --notify-sec notifications work accurately under comma-decimal locales.
  • Zero-Fork Git Config Check & NAME_MAX-Safe Async Cache: Reads .git/config in pure Bash before invoking git config, eliminating an extra subprocess fork on every prompt, and hashes deep paths (>180 chars) in SSP_GIT_ASYNC_CACHE.
  • Emoji-Aware RPROMPT Width & Bash 3.2 Regex: Added _ssp_vis_width_var for 2-column emojis in RPROMPT alignment, Bash 3.2-safe _re matching in getKube(), and EUID != 0 guard in getSudo().
  • Complete Exports, Root Sync & SSH Deploy: Added missing v1.2+ fields to export_preset(), synced all 24 segments in sync_root_config(), fixed stray spacing and conditional separators in export_starship_toml(), and applied full ASCII_SAFE_GIT_SYMBOLS + pure-Bash .bashrc hook in ssh-install.

Web Studio & Theme Polish

  • Propagated config_dir across all load_themes() calls and fixed # Theme: Name header 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

Choose a tag to compare

@mvsoares mvsoares released this 23 Nov 19:46

Highlights in v1.3.9

1. Smart DevOps Safety & Dynamic Context Colors

  • Kubernetes Namespace + 🚨 Production Warning (kube_namespace_prod): Pure-Bash $KUBECONFIG parser extracts both current-context and active namespace (☸ prod-cluster (payments)) and automatically highlights production contexts/namespaces (--kube-prod-pattern) in vibrant red with 🚨.
  • Dynamic Git Segment Colors (--git-dynamic-color): Automatically colors GIT amber when dirty and red during REBASE/MERGE/CHERRY/BISECT with seamless Powerline separator matching.
  • Deterministic SSH Hostname Colors (--ssh-host-color): Hashes $HOSTNAME into 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: Cached sudo credential badge, zero-fork Jujutsu (.jj) VCS detection, and user-defined CUSTOM badge (--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, macOS defaults, and Windows Registry color scheme automatically.
  • Fish-Style Path Abbreviation (--pwd-style fish): Pure-Bash ~/p/synth-shell-theme shortening.
  • Includes all v1.3.0–v1.3.3 improvements: Right-aligned top bar (RPROMPT), OSC 133 semantic markers (BEL \a terminated), 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 patched synth-shell-prompt.sh + config over a single SSH stream with zero Python or Git required remotely.
  • WezTerm + Starship Integration: --sync-ecosystem now generates wezterm-theme.lua alongside theme-env.sh (FZF_DEFAULT_OPTS + LS_COLORS) and tmux-theme.conf; export-starship exports any theme + dual separators to starship.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-tune

v1.0.0 — Synth-Shell Theme Studio

Choose a tag to compare

@mvsoares mvsoares released this 19 Nov 18:53

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.10 standard library, tested across Linux, macOS, and Windows.