[PR #11228] chore: add --no-headers flag to ListHandler for optional header suppression #13487

Open
opened 2026-04-13 00:28:35 -05:00 by GiteaMirror · 0 comments
Owner

Original Pull Request: https://github.com/ollama/ollama/pull/11228

State: open
Merged: No


This pull request introduces a new --no-headers flag to the list command, allowing users to suppress column headers in the output. Corresponding changes were made to the command implementation and its tests to support and validate this feature.

Feature Addition: --no-headers Flag

  • Command Implementation:

    • Added a --no-headers flag to the list command in func NewCLI() to allow users to toggle the display of column headers.
    • Updated ListHandler to conditionally set table headers based on the --no-headers flag.
  • Testing:

    • Enhanced the TestListHandler test suite to include a new test case for the --no-headers flag, verifying output without column headers.
    • Modified the test setup to handle the --no-headers flag in test cases, ensuring accurate simulation of the command's behavior.
**Original Pull Request:** https://github.com/ollama/ollama/pull/11228 **State:** open **Merged:** No --- This pull request introduces a new `--no-headers` flag to the `list` command, allowing users to suppress column headers in the output. Corresponding changes were made to the command implementation and its tests to support and validate this feature. ### Feature Addition: `--no-headers` Flag * **Command Implementation:** - Added a `--no-headers` flag to the `list` command in `func NewCLI()` to allow users to toggle the display of column headers. - Updated `ListHandler` to conditionally set table headers based on the `--no-headers` flag. * **Testing:** - Enhanced the `TestListHandler` test suite to include a new test case for the `--no-headers` flag, verifying output without column headers. - Modified the test setup to handle the `--no-headers` flag in test cases, ensuring accurate simulation of the command's behavior.
GiteaMirror added the pull-request label 2026-04-13 00:28:35 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#13487