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

# test passhole template function
stdin golden/stdin
exec chezmoi execute-template --no-tty '{{ passhole "example.com" "password" }}'
stdout examplepassword

-- bin/ph --
#!/bin/sh
case "$*" in
"--version")
    echo "1.9.9"
    ;;
"--password - show --field password example.com")
    echo "examplepassword"
    ;;
*)
    echo "ph: error: argument command: invalid choice:"
    exit 1
esac
-- bin/ph.cmd --
@echo off
IF "%*" == "--version" (
    echo 1.9.9
) ELSE IF "%*" == "--password - show --field password example.com" (
    echo examplepassword
) ELSE (
    echo ph: error: argument command: invalid choice:
    exit /b 1
)
-- golden/stdin --
fakepassword
