From 68c99b31d4c1fd7217c7e061eb1659493b5fad2a Mon Sep 17 00:00:00 2001 From: Evie Litherland-Smith Date: Mon, 6 Mar 2023 13:51:33 +0000 Subject: [PATCH] Add gitlab and github CLI completion to bash and zsh --- .bashrc | 3 +++ .zshrc | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/.bashrc b/.bashrc index 5204149a..f9254524 100644 --- a/.bashrc +++ b/.bashrc @@ -52,3 +52,6 @@ export PYENV_ROOT="$HOME/.pyenv" command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" command -v direnv > /dev/null 2>&1 && eval "$(direnv hook bash)" command -v starship > /dev/null 2>&1 && eval "$(starship init bash)" + +source <(glab completion -s bash) +source <(gh completion -s bash) diff --git a/.zshrc b/.zshrc index 2a3c419a..70c0cb23 100644 --- a/.zshrc +++ b/.zshrc @@ -53,3 +53,7 @@ export PYENV_ROOT="$HOME/.pyenv" command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH" command -v direnv > /dev/null 2>&1 && eval "$(direnv hook zsh)" command -v starship > /dev/null 2>&1 && eval "$(starship init zsh)" + +autoload -U compinit; compinit +source <(glab completion -s zsh); compdef _glab glab +source <(gh completion -s zsh); compdef _gh gh