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

オープン
#4,766 コメント 1 件 リアクション 2 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
csharp, powershell
領域
cli

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
C#
スター
4.4k
フォーク
341
PR マージ指標
30日以内にマージされた PR はありません

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

PowerShell/PSReadLine のほかの issue

PowerShell/PSReadLine の issue をすべて見る

似ている issue

C# の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。