Skip to content

Instantly share code, notes, and snippets.

@umiyosh
Last active December 23, 2023 08:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save umiyosh/96ac77719c6de6c79c52529dcef24b1d to your computer and use it in GitHub Desktop.
Save umiyosh/96ac77719c6de6c79c52529dcef24b1d to your computer and use it in GitHub Desktop.
# 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment