Open AminSallah opened 8 months ago
query.Search should return query without any action keyword, and raw should return with action keyword if exists. This is intentional. Sorry not 100% clear on what you are asking, are you asking why they don't include a space at the end?
yeah they don't include white spaces
Is it possible to know if query contains spaces at the end?
Unfortunately no, we never came across a scenario where whitespaces were needed to be kept for a plugin. What's your use case?
I see it before in some alfred workspaces. it's used frequently if user types space show available commands if not use default one.
In my case, with the Notion plugin I wanna implement a similar scenario. i split query by char !
then i wanna check if what after !
mark is whitespace show available properties names else use first index and start recording the page name. this gonna be more faster.
The current behavior after split by exclamation mark show property names after user select one show pages. I prefer to skip step one if no spaces, i hope if could explain my point.
Yeah that makes sense.
I thought both search and rawquery only trim the whitespaces at the start of the query string?
I thought this too, technically turns out it's trimming the end as well, i tried Search and RawQuery and SearchTerm also and they all return trimmed string. and i couldn't figure why it is trimmed.
I thought I fixed this in a PR sometime ago. 🤔
Edit: https://github.com/Flow-Launcher/Flow.Launcher/pull/1121
Please double check it, I used this plugin to check whether is contain spaces or not. Release link
https://github.com/AminSallah/Flow.Launcher.Plugin.whitespaces/releases/download/v1.0.0/Flow.Launcher.Plugin.whitespaces.zip
Action keyword s
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 60 days.\n\nAlternatively this issue can be kept open by adding one of the following labels:\nkeep-fresh
I noticed that Flow launcher consistently provides a trimmed query when using
query.Search
or evenquery.RawQuery
, returning a value without white spaces. This seems unusual to me compared to other launcher apps. Therefore, my question is: is this intentional for some specific reason, or is it something that can be fixed?