Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Word selection is too coarse, doesn't stop at non-letter characters

Open
#5,023 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
52/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp
Domain
cli

Research direction

Start in the PSReadLine PowerShell REPL handling for CTRL+LEFT/RIGHT and CTRL+SHIFT+LEFT/RIGHT word movement. Reproduce the provided Out-File '.\Temp\Test.csv' example and verify that navigation and selection stop at each non-letter boundary shown in the expected behavior.

Written by the indexing model from the issue text.

Description

Needs-Triage :mag:

Currently, editing and selecting text, like expressions or file paths, in the PowerShell REPL is quite cumbersome because only letters (Regex \w character group) are considered word boundaries.

I would expect the cursor to stop at the next non-letter (Regex \W character group) character when navigating using CTRL + LEFT/RIGHT ARROW.

Prerequisites
  • Write a descriptive title.
  • Make sure you are able to repro it on the latest released version
  • Search the existing issues, especially the pinned issues.
Screenshot

Word selection quite coarse

Environment data
PS Version: 7.5.4
PS HostName: ConsoleHost
PSReadLine Version: 2.3.6
PSReadLine EditMode: Windows
OS: 10.0.19041.4406 (WinBuild.160101.0800)
BufferWidth: 120
BufferHeight: 9001
Steps to reproduce
  1. Enter a text like the one from the screenshot into a PowerShell window:
    Out-File '.\Temp\Test.csv'
  2. Move the cursor using CTRL + LEFT/RIGHT ARROW keys
Expected behavior

Pressing CTRL + SHIFT + LEFT/RIGHT ARROW keys, I'd expect text selection to switch from Temp... to \Temp..., then .\Temp..., '.\Temp..., File '.\Temp... etc.

Actual behavior

Pressing CTRL + SHIFT + LEFT/RIGHT ARROW keys, text selection switches from Temp... to File '.\Temp... etc.

Dominant language
C#
Stars
4.4k
Forks
341
PR merge metrics
No merged PRs in 30d

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from PowerShell/PSReadLine

All issues in PowerShell/PSReadLine

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.