From 7e55a61dfe3ade6791e008cabd03cbe2663e065a Mon Sep 17 00:00:00 2001 From: Markus Binsteiner Date: Fri, 10 Sep 2021 09:55:06 +0200 Subject: [PATCH] ci: minor --- .github/workflows/build-linux.yaml | 8 -------- .kiara_complete.zsh | 32 ++++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+), 8 deletions(-) create mode 100644 .kiara_complete.zsh diff --git a/.github/workflows/build-linux.yaml b/.github/workflows/build-linux.yaml index be1ad78f0..d620da1fe 100644 --- a/.github/workflows/build-linux.yaml +++ b/.github/workflows/build-linux.yaml @@ -88,18 +88,10 @@ jobs: fetch-depth: 0 - name: install kiara run: pip install -U --pre --extra-index-url https://gitlab.com/api/v4/projects/25344049/packages/pypi/simple --extra-index-url https://pypi.fury.io/dharpa/ .[all,dev_documentation] -# - name: create documentation -# run: FAIL_DOC_BUILD_ON_ERROR=true make docs - run: git config --global user.email "markus@frkl.io" - run: git config --global user.name "Markus Binsteiner" - name: create documentation run: FAIL_DOC_BUILD_ON_ERROR=true mike deploy --push latest -# - name: deploy documentation to gh-pages -# uses: JamesIves/github-pages-deploy-action@4.1.0 -# with: -# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} -# BRANCH: gh-pages -# FOLDER: build/site build-docs-tag: name: build 'stable' documentation diff --git a/.kiara_complete.zsh b/.kiara_complete.zsh new file mode 100644 index 000000000..6604bbe03 --- /dev/null +++ b/.kiara_complete.zsh @@ -0,0 +1,32 @@ +#compdef kiara + +_kiara_completion() { + local -a completions + local -a completions_with_descriptions + local -a response + (( ! $+commands[kiara] )) && return 1 + + response=("${(@f)$( env COMP_WORDS="${words[*]}" \ + COMP_CWORD=$((CURRENT-1)) \ + _KIARA_COMPLETE="complete_zsh" \ + kiara )}") + + for key descr in ${(kv)response}; do + if [[ "$descr" == "_" ]]; then + completions+=("$key") + else + completions_with_descriptions+=("$key":"$descr") + fi + done + + if [ -n "$completions_with_descriptions" ]; then + _describe -V unsorted completions_with_descriptions -U + fi + + if [ -n "$completions" ]; then + compadd -U -V unsorted -a completions + fi + compstate[insert]="automenu" +} + +compdef _kiara_completion kiara;