Skip to content

Instantly share code, notes, and snippets.

@cx0
Created February 17, 2024 23:01
Show Gist options
  • Save cx0/90b8df2232561b48c3ca8b6d60abbcc2 to your computer and use it in GitHub Desktop.
Save cx0/90b8df2232561b48c3ca8b6d60abbcc2 to your computer and use it in GitHub Desktop.
GitHub CoPilot in the CLI

Use GitHub Copilot in the command line.

pip uninstall gh
brew install gh
gh auth login
gh extension install github/gh-copilot
gh extension upgrade gh-copilot
gh copilot suggest 'read text file line by line and return the total number of alphanum chars in each line'

Suggestion:

  while IFS= read -r line; do echo "$line" | tr -d -c '[:alnum:]' | wc -m; done < filename.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment