- /search command to search across memory, history, and configuration - history-browser.py for browsing and analyzing session history - install.sh for first-time setup with directory creation and validation - daily-maintenance.sh for scheduled backup, cleanup, and validation - systemd timer units for automated daily maintenance at 6 AM - Updated shell completions with 11 aliases - Test suite now covers 19 tests - Bump version to 1.1.0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
74 lines
2.6 KiB
Bash
74 lines
2.6 KiB
Bash
#!/bin/bash
|
|
# Bash completions for Claude Code automation scripts
|
|
# Source this file: source ~/.claude/automation/completions.bash
|
|
|
|
_claude_automation() {
|
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
local scripts="validate-setup quick-status backup restore clean memory-add memory-list search history install test maintenance"
|
|
|
|
COMPREPLY=($(compgen -W "${scripts}" -- "${cur}"))
|
|
}
|
|
|
|
_claude_search() {
|
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
COMPREPLY=($(compgen -W "--memory --history --config --recent" -- "${cur}"))
|
|
}
|
|
|
|
_claude_history() {
|
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
COMPREPLY=($(compgen -W "--list --show --stats --unsummarized --all --limit" -- "${cur}"))
|
|
}
|
|
|
|
_claude_memory_add() {
|
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
local prev="${COMP_WORDS[COMP_CWORD-1]}"
|
|
|
|
if [[ ${COMP_CWORD} -eq 1 ]]; then
|
|
COMPREPLY=($(compgen -W "preference decision project fact auto" -- "${cur}"))
|
|
fi
|
|
}
|
|
|
|
_claude_memory_list() {
|
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
|
|
COMPREPLY=($(compgen -W "preferences decisions projects facts --all" -- "${cur}"))
|
|
}
|
|
|
|
_claude_restore() {
|
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
local backup_dir="${HOME}/.claude/backups"
|
|
|
|
if [[ -d "${backup_dir}" ]]; then
|
|
local backups=$(ls -1 "${backup_dir}"/*.tar.gz 2>/dev/null | xargs -n1 basename)
|
|
COMPREPLY=($(compgen -W "${backups}" -- "${cur}"))
|
|
fi
|
|
}
|
|
|
|
# Register completions
|
|
complete -F _claude_memory_add memory-add.py
|
|
complete -F _claude_memory_list memory-list.py
|
|
complete -F _claude_restore restore.sh
|
|
complete -F _claude_search search.py
|
|
complete -F _claude_history history-browser.py
|
|
|
|
# Alias completions for convenience
|
|
alias claude-validate='~/.claude/automation/validate-setup.sh'
|
|
alias claude-status='~/.claude/automation/quick-status.sh'
|
|
alias claude-backup='~/.claude/automation/backup.sh'
|
|
alias claude-restore='~/.claude/automation/restore.sh'
|
|
alias claude-clean='~/.claude/automation/clean.sh'
|
|
alias claude-memory-add='python3 ~/.claude/automation/memory-add.py'
|
|
alias claude-memory-list='python3 ~/.claude/automation/memory-list.py'
|
|
alias claude-search='python3 ~/.claude/automation/search.py'
|
|
alias claude-history='python3 ~/.claude/automation/history-browser.py'
|
|
alias claude-install='~/.claude/automation/install.sh'
|
|
alias claude-test='~/.claude/automation/test-scripts.sh'
|
|
alias claude-maintenance='~/.claude/automation/daily-maintenance.sh'
|
|
|
|
echo "Claude Code completions loaded. Available aliases:"
|
|
echo " claude-validate, claude-status, claude-backup, claude-restore, claude-clean"
|
|
echo " claude-memory-add, claude-memory-list, claude-search, claude-history"
|
|
echo " claude-install, claude-test, claude-maintenance"
|