GoogleCloudPlatform / GoogleCloudPlatform/gsutil

gsutil partially breaks PSreadline

Open
#1,681 2 comments 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
918
Forks
335
PR merge metrics
No merged PRs in 30d

Description

I use PSReadline configured with the following config to get it to behave more like bash or zsh:

```
Set-PSReadLineOption -EditMode Emacs
Set-PSReadLineKeyHandler -Key 'Ctrl+V' -Function Paste
Set-PSReadLineKeyHandler -Key 'Ctrl+v' -Function Paste
Set-PSReadLineKeyHandler -Key 'Ctrl+/' -Function Undo
Set-PSReadLineKeyHandler -Key 'Ctrl+Backspace' -Function BackwardKillWord
Set-PSReadLineKeyHandler -Key 'Ctrl+LeftArrow' -Function BackwardWord
Set-PSReadLineKeyHandler -Key 'Ctrl+RightArrow' -Function ForwardWord
```

I opened a [separate issue with PSreadline](https://github.com/PowerShell/PSReadLine/issues/1970) that has been ignored (since it is a weird issue, I understand.)

I noticed that on Windows gsutil appears to have a CMD wrapper that I don't see in this repo (and it has a Google copyright header which does not include the Apache license, which is unfortunate since I would like to share it with the PSReadline issue in case anyone sees an obvious reason for the behavior.)

I don't get the issue with gcloud, although gcloud uses a Powershell wrapper (I wouldn't actually suggest switching to a Powershell wrapper, from past experience this could be a breaking change since it will change how arguments are handled when calling from a Powershell script.) In that case it might be better to wait for gcloud to become featureful enough to replace gsutil for all use cases.

Contributor guide

Open the contributing guide

Research direction

Start by inspecting the Windows gsutil CMD wrapper mentioned in the issue and compare its behavior with the gcloud PowerShell wrapper. Reproduce the interaction with the listed PSReadLine configuration and consult the linked PSReadLine issue; done requires identifying the wrapper behavior responsible for the breakage and documenting or correcting the supported behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell, python
Domain
cli, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.