jjw24 / Wox.Plugin.Runner

A plugin that allows you to create simple command shortcuts in Wox.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Program does not execute unless shortcut is fully completed

mwyschan opened this issue · comments

I have a shortcut setup like so:
Flow Launcher_kM8E9c5YAj

If I hit Enter before the shortcut is completed, e.g.:
egDlQv0jw7

Instead of running the program, the shortcut gets autocompleted, but with an asterisk in the front:
uO0koEetsv

However, if I type the full shortcut, then the program runs just fine, e.g.:
ET5nOAE3Bb

I would normally expect the shortcut to run even if it isn't completed.

Edit: changing the action keyword from * to something else (e.g. r) does not seem to change the behaviour, I have to type the entire command with the action keyword included (i.e. r arknights)

Just to confirm the behaviour, when you have your action keyword as r and you type r ark, hit enter, it will auto complete and hit enter again it will actually open arknights, is this the behaviour you are getting?

No, r ark + Enter results in * arknights, the same as the 2nd result screenshot.

In your first screenshot you have action keyword as *, did you change it to r when you tested it like I mentioned?

Yes, I did, see the edit in my initial comment.

Yeah I can see the issue why the * shows up which shouldn't

Context.API.ChangeQuery($"{Context.CurrentPluginMetadata.ActionKeyword} {c.Shortcut} {string.Join(' ', terms)}");
.

Will put through a fix.

I might also take the opportunity to drop the autocomplete part which shouldn't be needed, causing to press enter twice to launch the result.

I believe I've fixed this issue and have removed the need to press enter twice to launch suggested commands with PR #20.

I would appreciate it if someone else could test it and review it as C# isn't a language I program much in.