Vi Mode: Allow setting "Cursor" and "Prompt" ViModeIndicator at the same time

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

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

評価

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

調査の方向性

No file or test is named. Start by tracing how Set-PSReadLineOption handles ViModeIndicator and how ViModeChangeHandler affects the rendered prompt; compare the existing Cursor and Prompt behaviors. Done means both indicators can be enabled together and update correctly when switching Vi modes.

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

説明

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

Currently you can do both:

Set-PSReadLineOption -ViModeIndicator Cursor

and,

Set-PSReadLineOption -ViModeIndicator Prompt

But you can't set both at the same time.

Note that this is possible with readline, for example with:

set editing-mode vi

# vi INSERT prompt
# - "\e[6 q" is line caret
# - "\e[30;44m" is black on blue
# - "\e[0m" is reset
# = "\1" and "\2" are used to escape the non-printing characters
set vi-ins-mode-string "\1\e[6 q\e[30;44m\2 INS \1\e[0m\2 "

# vi NORMAL prompt
# - "\e[2 q" is block caret
# - "\e[30;47m" is black on white
# - "\e[0m" is reset
# = "\1" and "\2" are used to escape the non-printing characters
set vi-cmd-mode-string "\1\e[2 q\e[30;47m\2 NOR \1\e[0m\2 "

I understand that you can run a script block on -ViModeChangeHandler, but it's not trivial how to programatically change the already rendered prompt when this fires.

Proposed technical implementation details (optional)

No response

主要言語
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 を短くまとめたダイジェスト。