ntu/completions/ntu.bash
dschlueter 53c10f1913 feat: CI/CD, Bash-Completion und README-Verbesserungen
- GitHub Actions CI Pipeline (Tests, Clippy, Format-Checks)
- GitHub Actions Release Pipeline (Multi-Platform Builds)
- Bash-Completion Script für Shell-Autovervollständigung
- Zsh-Completion Script (_ntu)
- README Badges (CI, Release, Version, License)
- Installationsanleitung für Pre-built Binaries
- Alte build.yaml entfernt (ersetzt durch moderne ci.yml)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 10:39:44 +01:00

35 lines
969 B
Bash

# Bash completion for ntu (NameToUnix)
_ntu_completion() {
local cur prev opts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
# All available options
opts="--dry-run --no-changes --quiet --force --exclude --verbose --modify-root --special --help --version -n -q -f -e -v -h -V"
# Handle options that require arguments
case "${prev}" in
-e|--exclude)
# Suggest glob patterns
COMPREPLY=( $(compgen -W '"*.tmp" "*.log" "*.bak" "*.swp" "*~"' -- ${cur}) )
return 0
;;
*)
;;
esac
# If current word starts with -, complete with options
if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
# Otherwise complete with directories and files
COMPREPLY=( $(compgen -f -- ${cur}) )
return 0
}
# Register completion function
complete -F _ntu_completion ntu