ionic-team / ionic-cli

The Ionic command-line interface
MIT License
2k stars 644 forks source link

CLI item selection doesn't work property using Git Bash #2807

Closed kensodemann closed 6 years ago

kensodemann commented 6 years ago

From @ciaran036 on October 14, 2017 15:3

Ionic version: (For Ionic 1.x issues, please use https://github.com/ionic-team/ionic-v1)

I'm submitting a ... (check one with "x")

Current behavior: When using Git Bash on Windows, when the Ionic CLI prompts for the user to make a selection, Ionic will choose the wrong item from the one I actually selected.

gitbash

Expected behavior: When I move the cursor to a particular item, Ionic should actually perform the action for the correct selection.

Steps to reproduce: 1) Open a Git Bash terminal on Windows 2) Type any command which prompts for a selection, e.g. "ionic start myApp" 3) By using the keyboard to move the cursor to select an item, when the Enter key is pressed, Ionic will take the wrong option to the one I actually selected.

I've found that if I use Powershell I can select items successfully (although I'd prefer to use Git Bash so I can use Git commands easily).

Ionic info: (run ionic info from a terminal/cmd prompt and paste output below):

cli packages: (C:\Users\Ciaran\AppData\Roaming\npm\node_modules)

    @ionic/cli-utils  : 1.13.0
    ionic (Ionic CLI) : 3.13.0

System:

    Node : v8.6.0
    npm  : 5.3.0
    OS   : Windows 10

Misc:

    backend : pro

Copied from original issue: ionic-team/ionic#13147

kensodemann commented 6 years ago

Hello! Thank you for opening an issue with us!

This does not appear to be an issue with the Ionic Framework but with the Ionic CLI. I will move it to the CLI repo. Please track the new issue over there.

Thank you for using Ionic

imhoffd commented 6 years ago

@ciaran036 We use Inquirer.js for these interactive prompts. Please see this issue: https://github.com/SBoudrias/Inquirer.js/issues/570

For interactivity to work, it looks like Git Bash isn't an option. You can try a different shell (perhaps the native Windows 10 Bash?) or use --no-interactive mode on while specifying the parameters.

ciaran036 commented 6 years ago

Thank you so much for the help @dwieeb I hadn't realised Windows 10 Bash was at my fingertips already.

dxt420 commented 6 years ago

another option is a bit of a tweak just

while in the selection menu option in Git bash move your cursor to the list of items and then use the backspace key to clear the other options away until u left with option of your choice (cursor flexibility is enabled when one of multiple choices is to be taken)

worked for me

bravo-kernel commented 4 years ago

The best option I found thus far is:

All interaction will work as expected while still keeping the benefits of Git Bash 💃

mtliendo commented 4 years ago

If you have bash as a VS Code terminal, running interactive commands there will work also.

jsDeveloper98 commented 5 months ago

The best option I found thus far is:

All interaction will work as expected while still keeping the benefits of Git Bash 💃

thanks a lot