2024-09-12 15:36:06 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Required parameters:
|
|
|
|
# @raycast.schemaVersion 1
|
2024-09-12 15:38:33 +00:00
|
|
|
# @raycast.title yt
|
2024-09-12 15:36:06 +00:00
|
|
|
# @raycast.mode fullOutput
|
|
|
|
|
|
|
|
# Optional parameters:
|
|
|
|
# @raycast.icon 📹
|
|
|
|
# @raycast.argument1 { "type": "text", "placeholder": "YouTube link", "optional": false, "percentEncoded": true }
|
|
|
|
|
|
|
|
# Documentation:
|
|
|
|
# @raycast.description Run fabric yt on a YouTube link
|
|
|
|
# @raycast.author Daniel Miessler
|
|
|
|
# @raycast.authorURL https://github.com/danielmiessler
|
|
|
|
|
|
|
|
# Set PATH to include common locations and $HOME/go/bin
|
|
|
|
PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$HOME/go/bin:$PATH"
|
|
|
|
|
|
|
|
# Use the PATH to find and execute fabric
|
|
|
|
if command -v fabric >/dev/null 2>&1; then
|
2024-09-12 15:38:33 +00:00
|
|
|
yt {1}"
|
2024-09-12 15:36:06 +00:00
|
|
|
else
|
|
|
|
echo "Error: fabric command not found in PATH"
|
|
|
|
echo "Current PATH: $PATH"
|
|
|
|
exit 1
|
|
|
|
fi
|