[!windows] chmod 755 bin/pass
[windows] unix2dos bin/pass.cmd

# test pass template function
chezmoi execute-template '{{ pass "misc/example.com" }}'
stdout examplepassword
! stdout 'second line'

# test pass template function
chezmoi execute-template '{{ passRaw "misc/example.com" }}'
stdout 'second line'

-- bin/pass --
#!/bin/sh

case "$*" in
"show misc/example.com")
    echo "examplepassword"
    echo "second line"
    ;;
*)
    echo "pass: invalid command: $*"
    exit 1
esac
-- bin/pass.cmd --
@echo off
IF "%*" == "show misc/example.com" (
    echo "examplepassword"
    echo "second line"
    exit /b 0
) ELSE (
    echo pass: invalid command: %*
    exit /b 1
)
