Skip to content

Instantly share code, notes, and snippets.

@Ezku
Created September 13, 2021 08:12
Show Gist options
  • Save Ezku/017c43c66832cf8dc2453c6a2430e931 to your computer and use it in GitHub Desktop.
Save Ezku/017c43c66832cf8dc2453c6a2430e931 to your computer and use it in GitHub Desktop.
raycast-script-commands/Justfile
#!/usr/bin/env just
default:
just -l
# Update this git repository
update:
git fetch --depth 1 && git reset --hard origin/master
# Find available commands
commands query="":
find commands -type d -depth 2 \
| fzf \
--preview="tree -L 1 ./{}" \
--delimiter "/" \
--with-nth="2..-1" \
--query="{{query}}"
# Symlink from `commands` to `_enabled_commands`
install query="":
ln -sf $(pwd)/$(just commands {{query}}) $(pwd)/_enabled-commands/.
just enabled
# List directories symlinked to `_enabled_commands`
enabled:
tree _enabled-commands/ -L 1 -d -t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment