Added windows support to the runcommand plugin
Completes T10001
Details
- Reviewers
nicolasfella albertvaka - Group Reviewers
KDE Connect - Commits
- R224:f0486e16c9d0: [runcommand] Add windows support
- Run a command
- Run the command
Diff Detail
- Repository
- R224 KDE Connect
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Thanks for the patch!
I didn't test on Windows, but this breaks runcommand on Linux. ARGS on Linux needs to be "-c"
You should explicitly tell the user somewhere on the interface that cmd is being used to run the commands, since windows has many shells with entirely different syntax.
Maybe we can provide an option to select the shell. Basically an input box to fill the value of COMMAND and ARGS variable in the above code.
Sorry, I accidentally swapped -c and /c.
@shivanshukantprasad If the user wants to run commands on other shells. They could just invoke the shells themselves.
Would powershell be a better default, though? I don't think you can do much with cmd, actually.
Powershell is slow to start, especially on older computers. So if people just want to run a simple command, it'll create unessasary delay. If people really want to run powershell, they could just put powershell -c <command> in their command
Merged, but arcanist (the command line tool for Phabricator) gave me some problems because it looks like you cloned the repo from Github. It will work better if you clone it from https://anongit.kde.org/kdeconnect-kde.git
Also, in case you are not using arcanist to upload the patches, I recommend you to use it: https://community.kde.org/Infrastructure/Phabricator#Using_Arcanist_to_post_patches
@jambon I agree that the user can just invoke other shells but the user would probably find it easier to use if he knows what the default is, displaying it somewhere in the user interface would probably make it easier to use.