Last active
December 23, 2023 08:24
-
-
Save umiyosh/96ac77719c6de6c79c52529dcef24b1d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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