#!/usr/bin/env bash
REPLY="$*";

case "${REPLY% --skip-plugins --skip-themes --skip-packages}" in
    "theme path") echo "themes";;
    "plugin path") echo "plugins";;
    "package path") echo "packages";;
    'eval dirtsimple\imposer\Imposer::run_stream("php://fd/7");'*)
        if (($#>2)); then
            echo "--- Options: ---";
            for REPLY in "${@:3}"; do echo "$REPLY"; done
        fi
        echo "--- JSON: ---"; cat <&7
        echo "--- PHP: ---"; cat
        ;;
    *) echo "unexpected wp $*" >&9; exit 64 ;;
esac
