feat(ZSH): completion - add gitlab-ci-local command completion

This commit is contained in:
Olivier DOSSMANN 2024-11-29 20:56:49 +01:00
parent 6d554b6439
commit 3b6f416444

24
.zshrc
View File

@ -77,6 +77,26 @@ POWERLEVEL9K_SHORTEN_DIR_LENGTH=1
POWERLEVEL9K_SHORTEN_DELIMITER="" POWERLEVEL9K_SHORTEN_DELIMITER=""
POWERLEVEL9K_SHORTEN_STRATEGY="truncate_from_right" 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 # User configuration
export PAGER=most export PAGER=most
export BROWSER=elinks export BROWSER=elinks
@ -140,7 +160,8 @@ alias rero="ALIAS=rero /home/od/projets/rerologik/agnes"
# coloration de la commande IP # coloration de la commande IP
alias ip='ip -c' alias ip='ip -c'
alias k='kubectl' 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. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.
[[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh [[ -f ~/.p10k.zsh ]] && source ~/.p10k.zsh
@ -183,3 +204,4 @@ case $HOST in
#source /usr/bin/virtualenvwrapper.sh #source /usr/bin/virtualenvwrapper.sh
;; ;;
esac esac