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

Discussion: commandline arguments in v0.9 are not user-friendly or readable? #4601

Closed
Karl-WE opened this issue Feb 15, 2020 · 11 comments
Closed
Labels
Area-Commandline wt.exe's commandline arguments Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered

Comments

@Karl-WE
Copy link

Karl-WE commented Feb 15, 2020

Make arguments user-friendly and type friendly

With ver 0.9 arguments to launch WT has been introduced. This is really a good feature addition.
However I find that the arguments are very linux like and unfriendly to new users:

please refer Ned Pyle:
https://twitter.com/NerdPyle/status/1227757778732601344

and Cinnamon examples:
wt -p "Windows PowerShell" -d . ; split-pane -V wsl.exe

wt -d C:\Users\cinnamon\GitHub\WindowsTerminal ; split-pane -p "Command Prompt" ; split-pane -p "Ubuntu" -d \wsl$\Ubuntu\home\cinnak -H

I do not feel this is userfriendly. Not everyone that want to replace cmd and powershell with a modern terminal is a dev

implement arguments that allow both written and readable and shortened args example, which exlcude using ambigous args

examples
-r or -run
-l or -list

@Karl-WE Karl-WE added the Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. label Feb 15, 2020
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 15, 2020
@beviu
Copy link
Contributor

beviu commented Feb 15, 2020

I have not tested it but I think that should work:

wt --profile "Windows PowerShell" --startingDirectory . ; split-pane -V wsl.exe`
wt --startingDirectory C:\Users\cinnamon\GitHub\WindowsTerminal ; split-pane --profile "Command Prompt" ; split-pane --profile "Ubuntu" --startingDirectory \wsl$\Ubuntu\home\cinnak -H

You can read the doc here: https://github.com/microsoft/terminal/blob/master/doc/user-docs/UsingCommandlineArguments.md

@Karl-WE
Copy link
Author

Karl-WE commented Feb 15, 2020

Yes majorly this is ok
as you stated in your link / command line reference.

for some reason it uses -- instead of - which is uncommon to Windows
at a glance -V and -H are missing readable -- args

given my suggestion it should be more understood like autocomplete or readable args

let's compare with diskpart where you can say

lis dis
or list disk

so for terminal this should be -p or -profile not only --profile to make it easier to distinguish.
as long commands are not ambigous this will work fine.
then I would refrain from using lower and uppercase args if this is not really neccessary

so either
-v or -vertical instead of -V --vertical

as we are still in the beginning of args in WT I hope design decisions can still be made and yet we are in a beta, no one can complain about more drastical changes here (there should be few productive scripts)

@Karl-WE
Copy link
Author

Karl-WE commented Feb 15, 2020

another addition about consistency:
help feature allows familiar commands as /? -help and also --help

If we want to keep -- args for linux friendlyness, please allow to additionally use all args with just one - for Windows / Powershellists

This might please all usergroups which are used to - or -- arguments.

@Jaykul
Copy link
Contributor

Jaykul commented Feb 17, 2020

Well, I don't think Windows-native command-line apps have ever had a consistent (or readable) parameter experience, outside of PowerShell 😉

But why are we using linux syntax --longWords and Case Sensitive -Hp initials-stuck-together syntax on a Windows app? This syntax is not at all native or intuitive on this platform.

Before PowerShell, Windows apps did not use dashes at all, never mind double-dashes. We used /profile or /p and we didn't allow combining short forms.

In PowerShell, parameters are not case sensitive, and we still don't support the concept of combining short-form parameters.

The syntax split-pane -Hp "Windows PowerShell" just isn't normal in Windows.

@WSLUser
Copy link
Contributor

WSLUser commented Feb 18, 2020

But why are we using linux syntax --longWords and Case Sensitive -Hp initials-stuck-together syntax on a Windows app? This syntax is not at all native or intuitive on this platform.

Perhaps it could be made better but you are forgetting the primary users of Terminal are also using WSL. It is extremely likely that compatibility will be broken if that syntax isn't used.

@zadjii-msft zadjii-msft added the Product-Terminal The new Windows Terminal. label Feb 18, 2020
@DHowett-MSFT DHowett-MSFT added Area-Commandline wt.exe's commandline arguments and removed Product-Terminal The new Windows Terminal. labels Feb 18, 2020
@zadjii-msft zadjii-msft added the Product-Terminal The new Windows Terminal. label Feb 19, 2020
@DHowett-MSFT DHowett-MSFT added Issue-Question For questions or discussion and removed Issue-Feature Complex enough to require an in depth planning process and actual budgeted, scheduled work. labels Feb 21, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Feb 21, 2020
@DHowett-MSFT DHowett-MSFT added Needs-Tag-Fix Doesn't match tag requirements and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Feb 21, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Feb 21, 2020
@DHowett-MSFT
Copy link
Contributor

I'm marking this as the discussion area for commandline arguments.

@DHowett-MSFT DHowett-MSFT changed the title New Args in 0.9 are great, I plea for readable arguments Discussion: commandline arguments in v0.9 are not user-friendly or readable? Feb 21, 2020
@Jaykul
Copy link
Contributor

Jaykul commented Feb 22, 2020

the primary users of Terminal are also using WSL

I don't know what makes those of us using WSL the "primary" users. Every user of Terminal is also using Windows. WSL is a Windows app (which is why it has awful pop-up help behavior).

likely that compatibility will be broken if that syntax isn't used.

I'm sorry, but that's hogwash. Show me how using -parameter instead of --parameter "breaks" anything other than the expectations of posix users.

The idea that we should use posix-normal parameter syntax in a Windows app that pops up dialogs to show help is really just guaranteeing confusion. WSL users will use a lot of windows apps, both CLI and Windowed. None of those apps will use this syntax.

@Karl-WE
Copy link
Author

Karl-WE commented Feb 23, 2020

@DHowett-MSFT the original intention is a feature request. I am unsure if "discussions" will change anything in the product. Can you outline how this discussion will be handled by PM and designers?

@zadjii-msft
Copy link
Member

Okay so that's on me for not adding the long form of those args. I kinda threw the whole split-pane command into that PR, I definitely should have had long forms for those 😅

In general, we'll be having both long and short forms for the args we add to commands. Everything else in that spec has them, but sometimes when writing/reviewing a 700 line spec, you miss some of the details 😜

Just now, I actually discovered that CLI11 (which we're using for parsing the args) actually also implicitly supports the /d, /startingDirectory format for args as well. So as it turns out, wt supports both --unixStyleArgs and /windowsStyleArgs. Not only that, but the short windows forms actually doesn't support combining either (eg wt split-pane /Hp "Windows Powershell" doesn't work) . How neat!

@Karl-WE
Copy link
Author

Karl-WE commented Mar 1, 2020

I am looking forward how this will turn out in the future.

@zadjii-msft
Copy link
Member

Hey so this discussion seems to have run it's course. Since we're getting imminently close to 1.0 at this point, and it doesn't seem like we're about to dramatically change the surface of the commandline args, I'm going to close this discussion. I think we've addressed most of the complaints in the OP about not having --longForm versions of most parameters at this point, and the documentation is updated to reflect that.

Thanks for the feedback everyone!

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Apr 15, 2020
@zadjii-msft zadjii-msft added the Resolution-Answered Related to questions that have been answered label Apr 15, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Commandline wt.exe's commandline arguments Issue-Question For questions or discussion Product-Terminal The new Windows Terminal. Resolution-Answered Related to questions that have been answered
Projects
None yet
Development

No branches or pull requests

6 participants