Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Control backspace/delete in powershell and cmd terminal should delete word #68167

Closed
damongr-msft opened this issue Feb 7, 2019 · 2 comments
Closed
Assignees
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) terminal Integrated terminal issues

Comments

@damongr-msft
Copy link

damongr-msft commented Feb 7, 2019

Issue Type: Bug

Repro:

  1. Open terminal (powershell or cmd)
  2. type "dir foo"
  3. Press control-backspace
    Result: dir foo^W
    Expected: dir

Generally the same thing happens with control-delete when cursor is on the "f" in foo, it should delete the foo word, in the terminal it doesn't do anything.

VS Code version: Code 1.30.2 (61122f8, 2019-01-07T22:54:13.295Z)
OS version: Windows_NT x64 10.0.17763

System Info
Item Value
CPUs Intel(R) Xeon(R) CPU E5-1650 v4 @ 3.60GHz (12 x 3592)
GPU Status 2d_canvas: enabled
checker_imaging: disabled_off
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
native_gpu_memory_buffers: disabled_software
rasterization: enabled
video_decode: enabled
video_encode: enabled
webgl: enabled
webgl2: enabled
Memory (System) 31.92GB (12.40GB free)
Process Argv
Screen Reader no
VM 0%
Extensions (10)
Extension Author (truncated) Version
tslint eg2 1.0.42
gc-excelviewer Gra 2.1.28
vscode-antlr4 mik 2.1.1
prettify-json moh 0.0.3
mssql ms- 1.4.0
cpptools ms- 0.21.0
csharp ms- 1.17.1
PowerShell ms- 1.11.0
java red 0.38.0
vim vsc 1.0.7
@vscodebot
Copy link

vscodebot bot commented Feb 7, 2019

(Experimental duplicate detection)
Thanks for submitting this issue. Please also check if it is already covered by an existing one, like:

@vscodebot vscodebot bot added the terminal Integrated terminal issues label Feb 7, 2019
@damongr-msft damongr-msft changed the title Control backspace/delete in powershell terminal should delete word Control backspace/delete in powershell and cmd terminal should delete word Feb 7, 2019
@Tyriar
Copy link
Member

Tyriar commented Mar 31, 2019

I actually spoke with @TylerLeonhardt from the PowerShell team yesterday about exactly this and now know why it doesn't work. PSReadLine does not have a keybinding when set toe "Windows" edit mode for ^W which is what our terminal emits. To get this to work by manually assigning the right keybinding to ctrl+w or run this:

Set-PSReadLineOption -EditMode Emacs

@Tyriar Tyriar closed this as completed Mar 31, 2019
@Tyriar Tyriar added the *question Issue represents a question, should be posted to StackOverflow (VS Code) label Mar 31, 2019
@vscodebot vscodebot bot locked and limited conversation to collaborators May 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*question Issue represents a question, should be posted to StackOverflow (VS Code) terminal Integrated terminal issues
Projects
None yet
Development

No branches or pull requests

2 participants