[PR #2026] [CLOSED] Improve user feedback when run without input files (#1969) #2830

Closed
opened 2026-01-29 17:24:06 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/CCExtractor/ccextractor/pull/2026
Author: @tmdeveloper007
Created: 1/17/2026
Status: Closed

Base: masterHead: Issue-#1969


📝 Commits (3)

📊 Changes

1 file changed (+1 additions, -1 deletions)

View changed files

📝 src/ccextractor.c (+1 -1)

📄 Description

In raising this pull request, I confirm the following (please check boxes):

  • I have read and understood the contributors guide.
  • I have checked that another pull request for this purpose does not exist.
  • I have considered, and confirmed that this submission will be valuable to others.
  • I accept that this submission may not be used, and the pull request closed at the will of the maintainer.
  • I give this submission freely, and claim no ownership to its content.
  • I have mentioned this change in the changelog.

My familiarity with the project is as follows (check one):

  • I have never used CCExtractor.
  • I have used CCExtractor just a couple of times.
  • I absolutely love CCExtractor, but have not contributed previously.
  • I am an active contributor to CCExtractor.

Improve user feedback when run without input files (#1969)

Summary

This PR improves the command-line feedback provided to users when CCExtractor is executed without any input files. Previously, the tool would dump the entire help screen (hundreds of lines of text), which was confusing for new users and cluttered the terminal.

Changes

  • Modified src/ccextractor.c: Detect when EXIT_NO_INPUT_FILES is returned during parameter parsing.
  • Removed: The automatic call to print_usage() when no input files are detected.
  • Updated Error Message: Changed the fatal error output to be concise and actionable: "Input file required. Run 'ccextractor -h' for help."

Why this matters

Clear CLI feedback improves usability for new users and helps avoid confusion when CCExtractor is used in scripts or terminal-based workflows. It aligns with the feedback provided in issue #1969.

Testing Performed

  • No arguments: Verified that running ./ccextractor shows the concise error message.
  • Help flag: Verified that ./ccextractor -h still displays the full help documentation.
  • Normal execution: Verified that providing input files correctly bypasses this error check.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/CCExtractor/ccextractor/pull/2026 **Author:** [@tmdeveloper007](https://github.com/tmdeveloper007) **Created:** 1/17/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `Issue-#1969` --- ### 📝 Commits (3) - [`526e445`](https://github.com/CCExtractor/ccextractor/commit/526e44554495b66828c3f03e12e39b75725c21d2) Solving issue-1969 - [`c3aeae6`](https://github.com/CCExtractor/ccextractor/commit/c3aeae60ae9edf34e5a3c376e42cc4aceda61afd) Addressed CI test cases - [`afa555a`](https://github.com/CCExtractor/ccextractor/commit/afa555a3fe4e984afbae2461a7bda91645c806ba) CI tests compliance fixes ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `src/ccextractor.c` (+1 -1) </details> ### 📄 Description <!-- Please prefix your pull request with one of the following: **[FEATURE]** **[FIX]** **[IMPROVEMENT]**. --> **In raising this pull request, I confirm the following (please check boxes):** - [x] I have read and understood the [contributors guide](https://github.com/CCExtractor/ccextractor/blob/master/.github/CONTRIBUTING.md). - [x] I have checked that another pull request for this purpose does not exist. - [x] I have considered, and confirmed that this submission will be valuable to others. - [x] I accept that this submission may not be used, and the pull request closed at the will of the maintainer. - [x] I give this submission freely, and claim no ownership to its content. - [x] **I have mentioned this change in the [changelog](https://github.com/CCExtractor/ccextractor/blob/master/docs/CHANGES.TXT).** **My familiarity with the project is as follows (check one):** - [ ] I have never used CCExtractor. - [x] I have used CCExtractor just a couple of times. - [ ] I absolutely love CCExtractor, but have not contributed previously. - [ ] I am an active contributor to CCExtractor. # Improve user feedback when run without input files (#1969) ### Summary This PR improves the command-line feedback provided to users when CCExtractor is executed without any input files. Previously, the tool would dump the entire help screen (hundreds of lines of text), which was confusing for new users and cluttered the terminal. ### Changes - **Modified** [src/ccextractor.c](cci:7://file:///c:/ccextractor/src/ccextractor.c:0:0-0:0): Detect when `EXIT_NO_INPUT_FILES` is returned during parameter parsing. - **Removed**: The automatic call to [print_usage()](cci:1://file:///c:/ccextractor/src/lib_ccx/params.c:51:0-728:1) when no input files are detected. - **Updated Error Message**: Changed the fatal error output to be concise and actionable: `"Input file required. Run 'ccextractor -h' for help."` ### Why this matters Clear CLI feedback improves usability for new users and helps avoid confusion when CCExtractor is used in scripts or terminal-based workflows. It aligns with the feedback provided in issue #1969. ### Testing Performed - [x] **No arguments**: Verified that running `./ccextractor` shows the concise error message. - [x] **Help flag**: Verified that `./ccextractor -h` still displays the full help documentation. - [x] **Normal execution**: Verified that providing input files correctly bypasses this error check. ------ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 17:24:06 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/ccextractor#2830