mpv-locatefile-lua-script icon indicating copy to clipboard operation
mpv-locatefile-lua-script copied to clipboard

use mp.command_native instead of os.execute on Windows

Open dyphire opened this issue 2 years ago • 3 comments

This can realize that the command window is no longer open up on Windows

dyphire avatar Apr 23 '22 08:04 dyphire

@nimatrueway Do you have any opinion on this PR?

dyphire avatar Jun 28 '22 03:06 dyphire

I tested your PR on macOS, it didn't work @dyphire. Unfortunately I only have macOS at this moment, and can't test Linux/Windows either.

nimatrueway avatar Jun 28 '22 06:06 nimatrueway

I tested your PR on macOS, it didn't work @dyphire. Unfortunately I only have macOS at this moment, and can't test Linux/Windows either.

Oh, because I only tested it on windows, I didn't know it would destroy the use of macos/linux. I re examined the code, and it looked like I screwed up args when using subprocess. https://mpv.io/manual/master/#command-interface-args.

it should be linux_args = { 'bash', cmd } on linux, macos should use Zsh? Not sure. So I push the new commit to use the subprocess command only on Windows.

dyphire avatar Jun 28 '22 07:06 dyphire