Set-PSReadLineOption BellStyle should have an option for an actual ASCII 7 bell

Abierto
#4,766 1 comentario 2 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
csharp, powershell
Área
cli

Línea de trabajo

Start by locating Set-PSReadLineOption BellStyle and the existing Audible, Visual, and None handling. Review the linked Windows Terminal bell-style documentation alongside the current behavior. Done should include a selectable style that emits an ASCII 0x07 bell and a clear decision about the proposed default change.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Issue-Enhancement Needs-Triage :mag:
Prerequisites
  • Write a descriptive title.
Description of the new feature/enhancement

Hello,

I just realized this today but, even in the latest PSReadLine 2.3.6 when I configure the "Bell notification style" in Windows Terminal to, for example, ["window", "taskbar"] (briefly flash the console screen + taskbar icon) instead of audible (make the irritating pcspeaker noise) PSReadLine does not honor this setting - it still makes a sharp blip-like sound. I'm guessing PSReadLine does not emit an actual ASCII 0x7 BELL but rather implements its own sound playback.

This is very bad because:

  1. For the user it is unexpected behavior for a program emitting a BELL to not adhere to the terminals configured treatment of BELL signals
  2. PSReadLines only BELL configuration options are "Audible" (default), "Visual" and "None" but the hosting terminal application can have more abilities to indicate a BELL
  3. PSReadLine in practice really only has "Audible" and "None" as BellStyles because, at least on my machine, "Visual" does absolutely nothing making it equivalent to "None"
  4. Whatever custom BELL implementation PSReadLine has, it's got to be more lines of code than putchar(7); arguably making it a code smell and unnecessary bloat?
Proposed technical implementation details (optional)

I propose to add a BellStyle option that just makes PSReadLine, well, emit an actual 0x07 BELL. Also, I would very much like for this BellStyle (call it -BellStyle ASCIIBell or whatever) to be the new default BellStyle. Users who unironically prefer the eardrum-shattering, high-pitched blip of the current implementation can always change it back to Audible.

EDIT: Link to Windows Terminal BELL style configuration docs: https://learn.microsoft.com/en-us/windows/terminal/customize-settings/profile-advanced#bell-notification-style

Lenguaje dominante
C#
Estrellas
4.4k
Forks
341
Métricas de merge de PR
Sin PR fusionados en 30 d

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de PowerShell/PSReadLine

Todos los issues de PowerShell/PSReadLine

Issues similares

Más issues de C#

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.