Skip to content

Instantly share code, notes, and snippets.

@philhawksworth
Last active September 14, 2023 14:28
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save philhawksworth/b77d876e865ac190a6bb849913d4a744 to your computer and use it in GitHub Desktop.
Save philhawksworth/b77d876e865ac190a6bb849913d4a744 to your computer and use it in GitHub Desktop.
Raycast script to shorten a URL with https://findthat.at
#!/bin/zsh
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title Short URL
# @raycast.mode silent
# Optional parameters:
# @raycast.icon 🔗
# @raycast.argument1 { "type": "text", "placeholder": "URL" }
# @raycast.argument2 { "type": "text", "placeholder": "Short path" }
# @raycast.packageName Utils
# Documentation:
# @raycast.description Make a short URL with findthat.at
# @raycast.author Phil Hawksworth
# @raycast.authorURL https://www.hawksworx.com
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
output=$(shorten $1 $2)
echo "$output"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment