Skip to content

Latest commit

 

History

History

README.md

Shell Completion Testing Documentation

Documentation home · User manual · Bash guide · PowerShell guide

Created: 2025-12-29 Last Updated: 2026-07-28 Framework: cli-fp Coverage: Bash and PowerShell completion documentation

This directory contains current user guides plus historical completion test and development records. The dated test reports describe the implementation at the time they were written; use the user guides and the main user manual for current behavior.

Files

User Documentation

  • BASH_COMPLETION_GUIDE.md - Complete user guide for Bash completion

    • Installation instructions
    • How completion works
    • Common patterns and usage
    • Tips and tricks
    • Troubleshooting
  • PS_COMPLETION_GUIDE.md - Complete user guide for PowerShell completion

    • Installation instructions
    • Completion behavior and common patterns
    • PowerShell version notes
    • Troubleshooting

Testing Documentation

Verification

  • VERIFY_FIX.md - Quick verification steps for bug fixes

    • Test commands to verify the root-level flag completion fix
    • Actual test results showing the fix works
    • All verification tests passed! ✅
  • test_fix.md - Quick test script for the root-level flag completion fix

    • Before/after comparison
    • What was fixed and why

Project Summary

  • COMPLETION_WORK_SUMMARY.md - Overall work summary
    • All phases of work completed
    • Statistics and results
    • Files created/modified/deleted
    • Next steps

Historical Test Results Summary

Date: December 29, 2025 Framework: cli-fp Shell: Git Bash (Bash 4.x) Test Application: SubCommandDemo.exe

Results

  • Total Tests: 30
  • Passing: 26 (87%)
  • Real Bugs Found: 1
  • Real Bugs Fixed: 1 ✅
  • Status at the time: All tests passing correctly!

Bug Fixed

Root-level flag completion (e.g., ./app --h[TAB]) now works correctly.

  • File Modified: src/cli.application.pas
  • Fix: Added check for flags starting with - before attempting command matching

How to Use These Documents

For Users

Start with BASH_COMPLETION_GUIDE.md or PS_COMPLETION_GUIDE.md to learn how to use shell completion effectively.

For Testers

  1. Review BASH_COMPLETION_TESTS.md for the test suite
  2. Run tests manually in your shell
  3. Fill in actual results
  4. Compare with BASH_COMPLETION_TEST_SUMMARY.md for expected behavior

For Developers

  1. COMPLETION_WORK_SUMMARY.md - Overview of all work done
  2. BASH_COMPLETION_TEST_SUMMARY.md - Technical analysis of completion behavior
  3. test_fix.md - Specific bug fix details

Other Shells

Potential future coverage:

  • Zsh completion testing
  • Fish shell completion testing

Related Files

Completion Scripts (in example-bin/)

  • subcommanddemo_completion.bash - Generated Bash completion script
  • simpledemo_completion.bash - Generated Bash completion script
  • subcommanddemo_completion.ps1 - Generated PowerShell completion script

Checked-in generated scripts may be release snapshots. Regenerate them from the current executable before installation.

Source Code

  • src/cli.application.pas - Contains __complete implementation and script generators
    • HandleCompletion() - Main completion handler
    • DoComplete() - Completion logic
    • OutputBashCompletionScript() - Bash script generator
    • OutputPowerShellCompletionScript() - PowerShell script generator

Contributing

If you find issues with shell completion:

  1. Add or update an automated test in the main test suite
  2. Document expected vs actual behavior
  3. Create an issue with test results
  4. Reference the relevant guide or historical test record in bug reports

License

These test documents are part of the cli-fp framework and follow the same license.