#!/bin/bash
# OllieHere - Start or select an Ollie session for the current acme directory.
# Usage: Middle-click OllieHere in the acme tag.

set -euo pipefail

if [[ -z "${winid:-}" ]]; then
    echo "OllieHere must be run from within acme" >&2
    exit 1
fi

# Use the exact same session/agent selection as acme-ollie-ensure.
eval "$(acme-ollie-ensure)"
echo "OllieHere: $OLLIE_SESSION/$OLLIE_AGENT"
