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

Đang mở
#5,006 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
35/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
csharp, powershell
Lĩnh vực
cli

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C#
Star
4.4k
Fork
341
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của PowerShell/PSReadLine

Tất cả issue của PowerShell/PSReadLine

Issue tương tự

Thêm issue về C#

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.