[GH-ISSUE #1943] [Feature] Add the ability to run a command or start a shell from the interactive mode #26879

Open
opened 2026-04-22 03:35:24 -05:00 by GiteaMirror · 0 comments
Owner

Originally created by @jimscard on GitHub (Jan 12, 2024).
Original GitHub issue: https://github.com/ollama/ollama/issues/1943

Many times, I'll go into the CLI client interactive mode, e.g., ollama run [model] to get help on doing something. Then, I have to start up another terminal window in order to actually do it.
To make this more user-friendly, two keyboard shortcuts should be added to the ollama run interactive mode -- ! and shell. (It would be fine if they have to be preceded by a slash, e.g., /! and /shell.

The first option (referred to as "bang") takes a command line, and upon the user pressing enter, spawns that command. When the command completes, the user is prompted to continue For example, /!ls runs the ls command and displays the results, and then prompts "Press Enter to continue" before it returns to the ollama run prompt.

The second option spawns the user's preferred shell.

This should behave similarly to the analogous behavior in vim, e.g., :!ps shows the list of processes.... :shell brings up my shell; exiting with ctrl+d etc. returns to the ollama run interactive prompt.

Originally created by @jimscard on GitHub (Jan 12, 2024). Original GitHub issue: https://github.com/ollama/ollama/issues/1943 Many times, I'll go into the CLI client interactive mode, e.g., `ollama run [model]` to get help on doing something. Then, I have to start up another terminal window in order to actually do it. To make this more user-friendly, two keyboard shortcuts should be added to the ollama run interactive mode -- `!` and `shell`. (It would be fine if they have to be preceded by a slash, e.g., `/!` and `/shell`. The first option (referred to as "bang") takes a command line, and upon the user pressing enter, spawns that command. When the command completes, the user is prompted to continue For example, `/!ls` runs the `ls` command and displays the results, and then prompts "Press Enter to continue" before it returns to the ollama run prompt. The second option spawns the user's preferred shell. This should behave similarly to the analogous behavior in vim, e.g., `:!ps` shows the list of processes.... `:shell` brings up my shell; exiting with ctrl+d etc. returns to the ollama run interactive prompt.
GiteaMirror added the feature request label 2026-04-22 03:35:24 -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#26879