docs(shell): add function docstring comments

This commit is contained in:
2026-02-07 15:07:22 +02:00
parent 4266567327
commit 3ff83754b1
31 changed files with 135 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ set -euo pipefail
source "${DOTFILES}/config/shared.sh"
DEST="$HOME/.dotfiles/docs/nvim-keybindings.md"
# Generate Neovim keybindings documentation
main()
{
msg "Generating Neovim keybindings documentation"

View File

@@ -6,6 +6,7 @@
source "${DOTFILES}/config/shared.sh"
DEST="$HOME/.dotfiles/docs/wezterm-keybindings.md"
# Generate wezterm keybindings documentation
main()
{
msg "Generating wezterm keybindings documentation"

View File

@@ -41,6 +41,7 @@ packages=(
software-properties-common # add-apt-repository command
)
# Install apt packages that are not already present
install_packages()
{
local to_install=()
@@ -67,6 +68,7 @@ install_packages()
return 0
}
# Install all apt packages and report completion
main()
{
install_packages

View File

@@ -76,6 +76,7 @@ post_install_steps()
return 0
}
# Install cargo packages and run post-install steps
main()
{
install_packages

View File

@@ -12,6 +12,7 @@ PBB_SYNTAX="syntax: bash"
PBB_TAGS="tags: [bash]"
PBB_TEMP_DIR="${XDG_CACHE_HOME:-$HOME/.cache}/cheat/pbb"
# Verify required tools are installed
check_required_tools()
{
for t in "${PBB_REQUIRED_TOOLS[@]}"; do
@@ -23,6 +24,7 @@ check_required_tools()
return 0
}
# Clone or update the pure-bash-bible repository
clone_or_update_repo()
{
if [[ ! -d "$PBB_TEMP_DIR/.git" ]]; then
@@ -38,6 +40,7 @@ clone_or_update_repo()
return 0
}
# Get the cheat destination directory for pure-bash-bible
prepare_cheat_dest()
{
local cheat_dest
@@ -95,6 +98,7 @@ process_chapters()
return 0
}
# Install pure-bash-bible cheatsheets
main()
{
check_required_tools

View File

@@ -39,6 +39,7 @@ packages=(
gnupg2 # GPG encryption/signing
)
# Install the Development Tools dnf group
install_dev_tools_group()
{
if dnf group list installed 2>/dev/null | grep -q "Development Tools"; then
@@ -50,6 +51,7 @@ install_dev_tools_group()
return 0
}
# Install dnf packages that are not already present
install_packages()
{
local to_install=()
@@ -75,6 +77,7 @@ install_packages()
return 0
}
# Install all dnf packages and report completion
main()
{
install_dev_tools_group

View File

@@ -52,12 +52,14 @@ install_fonts()
return 0
}
# Remove the temporary nerd-fonts clone directory
remove_tmp_path()
{
rm -rf "$TMP_PATH"
return 0
}
# Clone, sparse-checkout, install fonts, and clean up
main()
{
clone_or_update_repo

View File

@@ -48,6 +48,7 @@ install_extensions()
return 0
}
# Install all GitHub CLI extensions
main()
{
install_extensions

View File

@@ -56,6 +56,7 @@ clear_go_cache()
return 0
}
# Install go packages, completions, and clear cache
main()
{
install_packages

View File

@@ -58,6 +58,7 @@ clean_npm_cache()
return 0
}
# Install, upgrade, and clean npm packages
main()
{
install_packages

View File

@@ -49,6 +49,7 @@ install_ntfy()
return 0
}
# Download and install ntfy
main()
{
install_ntfy

View File

@@ -68,6 +68,7 @@ upgrade_tools()
return 0
}
# Install Python tools, libraries, and upgrade all
main()
{
install_tools