Open manishrc opened 1 month ago
Thank you for opening this issue!
🔔 @djpowers @pernielsentikaer you might want to have a look.
Interesting suggestion, it looks like there's more context on Alfred's Dash workflow here: https://www.alfredapp.com/blog/productivity/dash-quicker-api-documentation-search/
The DevDocs macOS app does have scripting support: https://github.com/dteoh/devdocs-macos?tab=readme-ov-file#protocol-handler-integration
Using Raycast's runApplescript
function, I was able to add the following to the onSearchTextChange
block in SearchEntries
component, which opens a new window in the DevDocs app with the current search query (of note, DevDocs macOS appears to not expect the full slug: e.g., rails
instead of rails~7.1
):
runAppleScript(`tell application "DevDocs" to open location "devdocs-macos://search?doc=${slug}&term=${text}"`);
However, this results in a new window on each keystroke. If you debounce the input you lose out on the instant results, and it still seems a bit jarring to open a new tab without an explicit user action.
Even if this could be done in the current active tab I'm still hesitant to overwrite its contents when someone may not be expecting that.
I'll leave this open for a bit in case there are other thoughts but as it stands this seems like it would be tricky to implement without potentially negatively impacting the user experience.
Extension
https://www.raycast.com/djpowers/devdocs
Description
To search within DevDocs, you need to look for the keywords and press enter or command-enter.
Alfred + Dash integration had a nice feature where the Dash showed the documentation as you type within Alfred. Wondering if it's possible to do the same for DevDocs too.
Who will benefit from this feature?
No response
Anything else?
No response