Commit 0e950b4
committed
feat: improve search UX with smart std:: prefix and interactive menu
- Implement hybrid search strategy that tries std:: prefix first
- Searches for std::<pattern> before falling back to original pattern
- Returns std:: results early if >= 5 matches found
- Combines both result sets if std:: results are sparse
- Change default behavior to show first match directly
- Reverts selection menu from default cppman <page> behavior
- Provides faster access to most common use case
- Move interactive selection menu to -f flag
- cppman -f <keyword> now shows paginated selection menu
- Menu displays 20 results per page
- Navigation: 'n'/'next' for next page, 'p'/'prev' for previous
- Enter number to select, Enter alone to cancel
- Update documentation
- Updated program help text to explain new behavior
- Updated man page with smart search and pagination details
- Added -n/--max-results option documentation
This improves UX by reducing noise (e.g., 'cppman map' shows std::map
directly) while still providing comprehensive search via -f flag.1 parent 2948895 commit 0e950b4
3 files changed
Lines changed: 68 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
73 | | - | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
101 | 104 | | |
102 | 105 | | |
103 | 106 | | |
| |||
118 | 121 | | |
119 | 122 | | |
120 | 123 | | |
121 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
122 | 129 | | |
123 | 130 | | |
124 | 131 | | |
| |||
161 | 168 | | |
162 | 169 | | |
163 | 170 | | |
164 | | - | |
| 171 | + | |
165 | 172 | | |
166 | 173 | | |
167 | 174 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
540 | 555 | | |
541 | 556 | | |
542 | 557 | | |
| |||
546 | 561 | | |
547 | 562 | | |
548 | 563 | | |
| 564 | + | |
| 565 | + | |
549 | 566 | | |
550 | 567 | | |
551 | 568 | | |
| |||
596 | 613 | | |
597 | 614 | | |
598 | 615 | | |
599 | | - | |
600 | | - | |
| 616 | + | |
| 617 | + | |
601 | 618 | | |
602 | 619 | | |
603 | 620 | | |
| |||
608 | 625 | | |
609 | 626 | | |
610 | 627 | | |
611 | | - | |
612 | | - | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
613 | 634 | | |
614 | 635 | | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
615 | 652 | | |
616 | | - | |
| 653 | + | |
617 | 654 | | |
618 | 655 | | |
619 | 656 | | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
620 | 664 | | |
621 | 665 | | |
622 | 666 | | |
623 | 667 | | |
624 | 668 | | |
625 | | - | |
| 669 | + | |
626 | 670 | | |
627 | 671 | | |
628 | 672 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
| 9 | + | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
27 | | - | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
| |||
33 | 35 | | |
34 | 36 | | |
35 | 37 | | |
36 | | - | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
37 | 41 | | |
38 | 42 | | |
39 | 43 | | |
| |||
0 commit comments