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

Add method which parses command from a string #3

Open
DvdGiessen opened this issue Apr 6, 2024 · 1 comment
Open

Add method which parses command from a string #3

DvdGiessen opened this issue Apr 6, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@DvdGiessen
Copy link
Owner

To make it easier to execute a command line given as a string without first having to split the string in the calling application, we could add a method that parses a string into a command, arguments, and perhaps even environment variables, similar to how the shell would parse such a command line.

The shellwords package seems to be perfect for this.

This will also help work around the issue noted in #2, namely that there's no easy way to call a DBus method with a StringList argument in the KWin JS API.

@r0skar
Copy link

r0skar commented Apr 6, 2024

I think that makes a lot of sense and (imo) makes the behavior more intuitive. Even the naming of the actions (Exec.Cmd) suggest any "valid" command should work.

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

No branches or pull requests

2 participants