Simplify Your GitHub Copilot Commands with Custom Bash Aliases #25
matzar
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm excited to share a simple yet effective way to enhance your workflow with GitHub Copilot.
I've crafted two custom bash functions,
cop
andcope
:These functions streamline getting command suggestions and explanations directly in the terminal.
Examples
Using
cop
for Command Suggestions:This is equivalent to:
gh copilot suggest "Install and configure git lfs"
Using
cope
for Command Explanations:cope git lfs migrate import --everything --include="*.gz,*.png,*.jar"
This is equivalent to:
gh copilot explain 'git lfs migrate import --everything --include="*.gz,*.png,*.jar"'
These functions eliminate the need to type long commands, allowing quick and easy access to GitHub Copilot's features.
Integration into Your Shell
To add these functions to your shell environment:
.bashrc
file..zshrc
file.~/.config/fish/functions/
.This way, they'll be available every time you start a new shell session.
Beta Was this translation helpful? Give feedback.
All reactions