Skip to content

fix(powershell): errores de alias git y tema OMP corrupto en plantillas - #13

Merged
svg153 merged 1 commit into
masterfrom
svg153-fix-pwsh-templates
Oct 29, 2026
Merged

svg153 merged 1 commit into
masterfrom
svg153-fix-pwsh-templates

Conversation

@svg153

@svg153 svg153 commented Oct 29, 2026

Copy link
Copy Markdown
Owner

Problema

El despliegue de las plantillas de PowerShell reproducía 3 fallos en cada arranque de pwsh:

  1. 7× error: wrong number of arguments, should be from 1 to 2 — el perfil pasaba -ErrorAction SilentlyContinue a llamadas nativas git config --get. Git no es un cmdlet: el parámetro le llegaba como argumento literal extra. Además el bucle de alias generaba alias auto-referenciales (alias.st=st) que rompían git st/co/br/ci/df.
  2. CONFIG PARSE ERROR en el prompt — themes/catppuccin-mocha.omp.json contenía un preset en formato TOML, no JSON de Oh-My-Posh.
  3. Doble inicialización de prompt (Starship + Oh-My-Posh) donde OMP ganaba en silencio por ir último.

Cambios

  • templates/powershell/Copilot.DevProfile.ps1
    • Sección git: mapa de alias real (st/co/br/ci/df) y redirección 2>$null en llamadas nativas a git (con comentario explicativo).
    • Secciones 9+10 fusionadas en una sola: Oh-My-Posh (catppuccin-mocha) primario, Starship fallback vía elseif.
  • templates/powershell/themes/catppuccin-mocha.omp.json (nuevo)
    • Tema OMP válido, schema v2, paleta Catppuccin Mocha (sustituye el TOML roto).

Validación

  • Parser::ParseFile → 0 errores de sintaxis.
  • ConvertFrom-Json → OK (version 2, 2 blocks).
  • Sin -ErrorAction en llamadas nativas a git.
  • Probado en máquina: arranque de pwsh 100% limpio, git st funcional.

Notas

  • No toca .config/starship.toml (ya era correcto en el repo).
  • Los errores Import-Clixml eran del módulo Terminal-Icons (carrera de concurrencia), parcheado localmente fuera de este repo.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…error

- Replace -ErrorAction SilentlyContinue on native git config calls with
  2>$null (git is not a cmdlet; the parameter was passed as a literal
  argument causing "wrong number of arguments, should be from 1 to 2")
- Use a real alias map (st/co/br/ci/df) instead of self-referential
  alias.<name>=<name> entries
- Merge prompt sections 9+10 into one: Oh-My-Posh (catppuccin-mocha)
  primary, Starship fallback via elseif
- Replace broken TOML-as-.omp.json theme with valid OMP JSON schema v2

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@svg153
svg153 merged commit 2b53977 into master Oct 29, 2026
1 of 3 checks passed
@svg153
svg153 deleted the svg153-fix-pwsh-templates branch October 29, 2026 23:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant