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

read only one character #25

Open
alaypatel07 opened this issue Jun 17, 2022 · 1 comment
Open

read only one character #25

alaypatel07 opened this issue Jun 17, 2022 · 1 comment

Comments

@alaypatel07
Copy link

alaypatel07 commented Jun 17, 2022

When users run kubectl-safe binary and they get a prompt as follows:

$ kubectl-safe delete pod
You are running a delete against context np-minikube.nid.nvidiangn.net, continue? [yY] 

it would be much easier if user can just click one character and the program can decided whether it is a y or Y instead of hitting y and pressing 'Enter'

I believe it will greatly improve the user experience

@rumstead
Copy link
Owner

rumstead commented Jun 18, 2022

I can see how that will help but I have typically seen CLIs require the enter.

❯ rm -ri $DIR
examine files in directory /var/folders/qc/5qls4cn91p7f3x4j21gmj_t00000gp/T/tmp.rPuUNUUb? y
remove /var/folders/qc/5qls4cn91p7f3x4j21gmj_t00000gp/T/tmp.rPuUNUUb? y
# apt-get install zip
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  unzip
The following NEW packages will be installed:
  unzip zip
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 403 kB of archives.
After this operation, 1032 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
❯ az aks  get-credentials ...
A different object named foo already exists in your kubeconfig file.
Overwrite? (y/n): y

EDIT: I am open to it, what are you thoughts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants