apt-ostree/debian/apt-ostree.zsh-completion
joe f26ffe8607
Some checks failed
Comprehensive CI/CD Pipeline / Build and Test (push) Failing after 11s
Comprehensive CI/CD Pipeline / Security Audit (push) Failing after 12s
Comprehensive CI/CD Pipeline / Package Validation (push) Successful in 3m51s
Comprehensive CI/CD Pipeline / Status Report (push) Has been skipped
feat: Implement comprehensive Debian packaging improvements and enhanced CI workflow
- Enhanced Package Information: Expanded PackageInfo struct with 23 fields including section, priority, maintainer, homepage, size, dependencies, and more
- Real Package Data Extraction: Integrated dpkg and apt-cache for actual package information instead of mock data
- Professional Debian Packaging: Added man pages, shell completions, postinst/prerm scripts, triggers, and lintian overrides
- Enhanced Build System: Improved debian/rules with cross-compilation support, enhanced build.sh with options and validation
- CI Workflow Updates: Added missing build dependencies, enhanced package validation, lintian quality checks, and comprehensive reporting
- Quality Assurance: Added lintian validation, enhanced file checking, and professional packaging standards
- Documentation: Comprehensive README.Debian with build instructions and troubleshooting guide

Resolves mock package issues and provides production-ready Debian packaging infrastructure.
2025-08-15 14:05:37 -07:00

72 lines
2.9 KiB
Text

# apt-ostree zsh completion
# Generated for apt-ostree version 0.1.0
_apt_ostree() {
local curcontext="$curcontext" state line
typeset -A opt_args
_arguments -C \
'1: :->cmds' \
'*:: :->args'
case $state in
cmds)
local commands
commands=(
'info:Display detailed package information'
'search:Search for packages in APT repositories'
'install:Install packages and create new OSTree deployment'
'remove:Remove packages and create new OSTree deployment'
'upgrade:Upgrade all packages and create new OSTree deployment'
'rollback:Rollback to previous OSTree deployment'
'status:Show current OSTree deployment status'
'help:Show help message'
'version:Show version information'
)
_describe -t commands 'apt-ostree commands' commands
;;
args)
case $line[1] in
info|install|remove)
# Complete with package names from APT cache
if (( $+commands[apt-cache] )); then
local packages
packages=($(apt-cache --no-generate pkgnames 2>/dev/null | grep -i "^$words[CURRENT]" | head -20))
_describe -t packages 'packages' packages
fi
;;
search)
# Complete with search terms
local search_terms
search_terms=(
'package:Search by package name'
'name:Search by package name'
'description:Search by package description'
'maintainer:Search by package maintainer'
)
_describe -t search_terms 'search terms' search_terms
;;
*)
# Global options
local global_opts
global_opts=(
'--help[Show help message]'
'--version[Show version information]'
'--verbose[Enable verbose output]'
'--quiet[Suppress non-error messages]'
'--config[Path to configuration file]:config file:_files -g "*.toml"'
'--data-dir[Path to data directory]:directory:_directories'
'--log-level[Set log level]:log level:(trace debug info warn error)'
)
_describe -t global_opts 'global options' global_opts
;;
esac
;;
esac
}
# Register the completion function
compdef _apt_ostree apt-ostree
# Also complete for the short alias if it exists
compdef _apt_ostree aost 2>/dev/null || true