Skip to content

Instantly share code, notes, and snippets.

@vehas
Created February 9, 2021 00:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vehas/3a2907b382b28a23d83df7cbf71ffb7d to your computer and use it in GitHub Desktop.
Save vehas/3a2907b382b28a23d83df7cbf71ffb7d to your computer and use it in GitHub Desktop.
ray cast script command to run clojure (babashka)
#!/bin/bash
# work with ray cast script command https://github.com/raycast/script-commands
# Dependency: requires babashka (https://github.com/babashka/babashka)
# Install via bash: `bash < <(curl -s https://raw.githubusercontent.com/babashka/babashka/master/install)`
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title clj
# @raycast.mode compact
# @raycast.packageName Developer Utils
#
# Optional parameters:
# @raycast.icon 🤖
# @raycast.argument1 { "type": "text", "placeholder": "hello world" }
#
# Documentation:
# @raycast.description run clojure code
# @raycast.author Veha s.
# @raycast.authorURL https://github.com/vehas
if ! command -v bb &> /dev/null; then
echo "bb is required (https://github.com/babashka/babashka).";
exit 1;
fi
result=$(bb -e "$1")
echo $result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment