#!/usr/bin/env bash
# Verify task completion output includes monorepo tasks when using // paths

# Root config marks repo as monorepo
cat <<'CONFIG' >mise.toml
experimental_monorepo_root = true

[tasks.root-task]
run = 'echo root'
CONFIG

# App subproject task that should appear in completions
mkdir -p apps/web
cat <<'CONFIG' >apps/web/mise.toml
[tasks.update-snapshots]
description = "Update monorepo snapshots"
run = 'echo updating snapshots'
CONFIG

# Completion output should include the //-prefixed task path with escaped colon
assert_contains "mise task ls --complete" '//apps/web\:update-snapshots:Update monorepo snapshots'
