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

Open
opened 2026-04-23 00:05:30 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/11228
Author: @a-klos
Created: 6/28/2025
Status: 🔄 Open

Base: mainHead: chore/list-models-without-headers


📝 Commits (1)

  • d3467ba feat: add --no-headers flag to ListHandler for optional header suppression

📊 Changes

2 files changed (+25 additions, -1 deletions)

View changed files

📝 cmd/cmd.go (+9 -1)
📝 cmd/cmd_test.go (+16 -0)

📄 Description

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.

🔄 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/ollama/ollama/pull/11228 **Author:** [@a-klos](https://github.com/a-klos) **Created:** 6/28/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `chore/list-models-without-headers` --- ### 📝 Commits (1) - [`d3467ba`](https://github.com/ollama/ollama/commit/d3467ba1e9ffd73a5f41eec87aa23d97d75531f3) feat: add --no-headers flag to ListHandler for optional header suppression ### 📊 Changes **2 files changed** (+25 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `cmd/cmd.go` (+9 -1) 📝 `cmd/cmd_test.go` (+16 -0) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-23 00:05:30 -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#39360