arkanum/arkanum-completion
OCram85 b59945fc5b
All checks were successful
ci/woodpecker/push/docs Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
add session helper (#141)
### 📖 Summary

adds session helper:

- save session items
- restore a session
- show save session items
- reset a session file.

### 📑 Test Plan

 CI pipeline tests (Default)

### 💬 Details

_No response_

### 📚 Additional Notes

_No response_

Reviewed-on: #141
2024-11-21 15:44:11 +01:00

44 lines
1.1 KiB
Bash

#!/bin/env bash
#complete -W "--disable-motd --install-extensions --reset-codesetting docker-cli dotnet gitea golang nodejs volta powershell -h" arkanum
function _command_completions() {
local cur prev
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
case ${COMP_CWORD} in
1)
# shellcheck disable=2207,SC2086
COMPREPLY=($(compgen -W "config git install help session" -- ${cur}))
;;
2)
case ${prev} in
config)
# shellcheck disable=2207,SC2086
COMPREPLY=($(compgen -W "disable-motd install-extensions reset-codesettings" -- ${cur}))
;;
git)
# shellcheck disable=2207,SC2086
COMPREPLY=($(compgen -W "setup" -- ${cur}))
;;
install)
# shellcheck disable=2207,SC2086
COMPREPLY=($(compgen -W "docker-cli dotnet golang bun nodejs volta powershell gitea lazygit" -- ${cur}))
;;
session)
# shellcheck disable=2207,SC2086
COMPREPLY=($(compgen -W "save restore show reset" -- ${cur}))
;;
help)
;;
esac
;;
*)
COMPREPLY=()
;;
esac
}
complete -F _command_completions arkanum