From 3b6f4164441ac0b32cf7130abc993660c6674259 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Fri, 29 Nov 2024 20:56:49 +0100 Subject: [PATCH] feat(ZSH): completion - add gitlab-ci-local command completion --- .zshrc | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.zshrc b/.zshrc index a202356..c14bb78 100644 --- a/.zshrc +++ b/.zshrc @@ -77,6 +77,26 @@ POWERLEVEL9K_SHORTEN_DIR_LENGTH=1 POWERLEVEL9K_SHORTEN_DELIMITER="" POWERLEVEL9K_SHORTEN_STRATEGY="truncate_from_right" +#compdef gitlab-ci-local +###-begin-gitlab-ci-local-completions-### +# +# yargs command completion script +# +# Installation: gitlab-ci-local completion >> ~/.zshrc +# or gitlab-ci-local completion >> ~/.zprofile on OSX. +# +_gitlab-ci-local_yargs_completions() +{ + local reply + local si=$IFS + IFS=$' +' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" gitlab-ci-local --get-yargs-completions "${words[@]}")) + IFS=$si + _describe 'values' reply +} +compdef _gitlab-ci-local_yargs_completions gitlab-ci-local +###-end-gitlab-ci-local-completions-### + # User configuration export PAGER=most export BROWSER=elinks @@ -140,7 +160,8 @@ alias rero="ALIAS=rero /home/od/projets/rerologik/agnes" # coloration de la commande IP alias ip='ip -c' alias k='kubectl' -alias devu="${HOME}/devu42/devu/devu" +alias devu="${HOME}/devu/devu/devu" +alias gcle='gitlab-ci-local' # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. [[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh @@ -183,3 +204,4 @@ case $HOST in #source /usr/bin/virtualenvwrapper.sh ;; esac +