Skip to content

Conversation

kyu08
Copy link
Owner

@kyu08 kyu08 commented May 3, 2025

Resolves #364

What is "passing additional arguments"?

  1. Press Ctrl + o to open additional arguments popup.
     2025-05-07 at 23 42 02
  2. Enter additional arguments.
     2025-05-07 at 23 42 37
  3. Press Enter to execute the command.
     2025-05-07 at 23 42 48
  4. The command is executed with the additional arguments.
     2025-05-07 at 23 46 42

TODO

  • Implementation
    • UI
    • Internal logic
  • Test
  • Documentation
    • Update README if need
    • Update keybindings pane
  • Write up PR body
    • Put screenshot for this feature
  • (After release) Tell the person requested this feature on reddit releasing this feature.
Test

  • document these test cases in /docs/MANUAL_TEST_CASES.md.
  • fzf-make
    • Execution
      • A command name executing is shown
      • Selected command is executed
    • Narrowing down
      • Placeholder is shown when no characters are typed.
      • Narrowing down works properly when some characters are typed.
      • No command is shown when no command is matched.
      • Focus is reset when backspace is pressed.
      • Focus is reset when a character is typed.
    • Preview window
      • Preview window works properly.
    • History
      • A executed command is stored in histories after execution
      • Histories is shown properly
      • Any command can be executed from history pane
    • Quitting
      • esc quits fzf-make
    • Additional arguments popup
      • common
        • esc closes the popup
      • make
        • no additional argument
          • can be executed properly
          • can be saved properly
        • one additional arguments
          • can be executed properly
          • can be saved properly
        • multiple additional arguments
          • can be executed properly
          • can be saved properly
      • pnpm
        • no additional argument
          • can be executed properly
          • can be saved properly
        • one additional arguments
          • can be executed properly
          • can be saved properly
        • multiple additional arguments
          • can be executed properly
          • can be saved properly
      • yarn
        • no additional argument
          • can be executed properly
          • can be saved properly
        • one additional arguments
          • can be executed properly
          • can be saved properly
        • multiple additional arguments
          • can be executed properly
          • can be saved properly
      • just
        • no additional argument
          • can be executed properly
          • can be saved properly
        • one additional arguments
          • can be executed properly
          • can be saved properly
        • multiple additional arguments
          • can be executed properly
          • can be saved properly
  • fzf-make --repeat executes the command the last one.
  • fzf-make --history launches fzf-make focusing history pane.

@kyu08 kyu08 changed the title model transition for ui feat(command): support passing additional arguments to a command May 3, 2025
@kyu08 kyu08 changed the title feat(command): support passing additional arguments to a command feat(command): support passing additional arguments to the command May 3, 2025
@kyu08 kyu08 force-pushed the feat-364 branch 14 times, most recently from 6cfdbd8 to 5880378 Compare May 4, 2025 16:42
@kyu08 kyu08 self-assigned this May 6, 2025
@kyu08 kyu08 added the enhancement 🛠️ New feature or request label May 6, 2025
@kyu08 kyu08 requested a review from Copilot May 7, 2025 14:57
@kyu08 kyu08 marked this pull request as ready for review May 7, 2025 14:57
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces support for passing additional arguments to commands via a popup UI while refactoring command handling to use a new command type (CommandForExec).

  • Integrates a popup window for entering extra arguments in the UI
  • Updates command history, runner execution, and related test cases to use the new CommandForExec type
  • Adjusts code throughout the codebase to seamlessly support the additional arguments feature

Reviewed Changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/usecase/tui/ui.rs Adds popup window rendering and updates commands block layout
src/usecase/tui/app.rs Updates key event handling and command history methods
src/usecase/repeat.rs Adjusts command execution to use CommandForExec
src/model/* Refactors command types and methods to use CommandForExec
README.md Documents new feature for passing additional arguments
Files not reviewed (2)
  • test_data/just/justfile: Language not supported
  • test_data/make/Makefile: Language not supported

@kyu08 kyu08 enabled auto-merge (squash) May 7, 2025 15:08
@kyu08 kyu08 disabled auto-merge May 7, 2025 15:08
@kyu08 kyu08 merged commit f3ecd7e into main May 7, 2025
4 checks passed
@kyu08 kyu08 deleted the feat-364 branch May 7, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🛠️ New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(command): support passing additional arguments to the command
1 participant