PSReadLine icon indicating copy to clipboard operation
PSReadLine copied to clipboard

Alt-a should support --parameters with double dashes

Open Jaykul opened this issue 1 year ago • 0 comments

Prerequisites

  • [X] Write a descriptive title.

Description of the new feature/enhancement

The Alt+A key that navigates between parameters doesn't properly handle parameters from posix-friendly apps like the azure cli and kubectl that use two dashes instead of one. I. E. --output "json" instead of skipping the parameter name, it selects it.

Proposed technical implementation details (optional)

We could argue this is a parser bug, because the root cause is probably that the AST doesn't represent --output json as a parameter name and value, but instead as two string arguments.

However, you could solve it without changing the AST, by just checking for the -- on the front of the value...

Jaykul avatar Apr 09 '24 21:04 Jaykul