dprofile (das-helpers 0.2.0) installs profiles listed in /usr/share/das/profiles: packages from the Void repository between a snapper pre/post pair, their services and groups, subordinate IDs and a shared root mount for rootless Podman, and optional IDEs from Flathub. The installed system can't see the Das OS repository yet, so a das-dev metapackage could not be installed there; Void packages always can. The dev profile: Go, Python, Node.js, Git, Docker, Podman and command-line tools everywhere, VS Code (code-oss), Meld and Flatpak on a desktop, with Android Studio and JetBrains IDEs on demand. Questions come before sudo. das-welcome (das-tools 0.4.0) gets a developer profile row that runs dprofile in a terminal; das-server-install mentions it at the end. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
33 lines
1.1 KiB
Plaintext
33 lines
1.1 KiB
Plaintext
# bash completion for dprofile
|
|
# shellcheck shell=bash
|
|
_dprofile() {
|
|
local cur=${COMP_WORDS[COMP_CWORD]} cmd=${COMP_WORDS[1]:-} dir=/usr/share/das/profiles
|
|
local profiles
|
|
profiles=$(find "$dir" -maxdepth 1 -name '*.conf' -printf '%f\n' 2>/dev/null | sed 's/\.conf$//')
|
|
if ((COMP_CWORD == 1)); then
|
|
mapfile -t COMPREPLY < <(compgen -W "list show install apps app help" -- "$cur")
|
|
return
|
|
fi
|
|
case $cmd in
|
|
show | apps | check)
|
|
((COMP_CWORD == 2)) && mapfile -t COMPREPLY < <(compgen -W "$profiles" -- "$cur")
|
|
;;
|
|
install)
|
|
if [[ ${COMP_WORDS[COMP_CWORD - 1]} == --apps ]]; then
|
|
mapfile -t COMPREPLY < <(compgen -W "all none" -- "$cur")
|
|
else
|
|
mapfile -t COMPREPLY < <(compgen -W "$profiles --yes --apps" -- "$cur")
|
|
fi
|
|
;;
|
|
app)
|
|
if ((COMP_CWORD == 2)); then
|
|
mapfile -t COMPREPLY < <(compgen -W "add rm" -- "$cur")
|
|
else
|
|
# the last part of the IDs in the profiles: AndroidStudio, GoLand
|
|
mapfile -t COMPREPLY < <(compgen -W "$(sed -n 's/^[a-z]*\.[A-Za-z0-9.-]*\.\([A-Za-z0-9-]*\) .*/\1/p' "$dir"/*.conf 2>/dev/null)" -- "$cur")
|
|
fi
|
|
;;
|
|
esac
|
|
}
|
|
complete -F _dprofile dprofile
|