Skip to content

Commit

Permalink
Merge pull request #964 from lemorage/rust-docs-search
Browse files Browse the repository at this point in the history
Add Rust docs web search
  • Loading branch information
giedreblekaite authored Sep 20, 2024
2 parents 9a03ab6 + 44fbfcc commit ce7fcb9
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
Binary file added commands/web-searches/images/rust.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions commands/web-searches/search-rust-docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash

# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Search Rust Documentation
# @raycast.mode silent
#
# Optional parameters:
# @raycast.packageName Web Searches
# @raycast.icon images/rust.png
# @raycast.argument1 { "type": "text", "placeholder": "Name", "percentEncoded": true }
#
# Example query:
# Searching for `expect` will open this link in your browser:
# `https://doc.rust-lang.org/std/?search=expect`.
#
# Documentation:
# @raycast.author lemorage
# @raycast.authorURL https://raycast.com/lemorage
# @raycast.description Search Rust documentation

query=$(echo "$1" | sed 's/ /%20/g')

open "https://doc.rust-lang.org/std/?search=$query"

0 comments on commit ce7fcb9

Please sign in to comment.