# Pre requirement: install https://github.com/Omochice/deepl-translate-cli # Usage: source <(curl -sSL https://gist.githubusercontent.com/umiyosh/96ac77719c6de6c79c52529dcef24b1d/raw/9ad164120d66f5afdb1b4ece4d07740b29fb7caa/github-copilot-cli-wrapper.sh) # Example: https://twitter.com/umiyosh/status/1641625929360474113 function 'myhelp' () { if [ -z "$*" ] then echo "Usage: ?? '<任意の日本語>'" return 1 fi translated_cmd=$(echo "$*" | deepl-translate-cli -pro -s ja -t en) echo "Translated command: ?? ${translated_cmd}" copilot_what-the-shell "${translated_cmd}" } alias '??'=myhelp