1#!/usr/bin/env bash 2 3set -euo pipefail 4 5# Skip the first argument which is expected to be `--` 6shift 7 8args=() 9 10for arg in "$@"; do 11 # Check if the argument contains "${PWD}" and replace it with the actual value of PWD 12 if [[ "${arg}" == *'${pwd}'* ]]; then 13 arg="${arg//\$\{pwd\}/$PWD}" 14 fi 15 args+=("${arg}") 16done 17 18exec "${args[@]}" 19