Skip to content

Feat: Add option to skip confirmations#52

Open
Alphan-Aksoyoglu wants to merge 2 commits intoprime-run:masterfrom
Alphan-Aksoyoglu:add-confirmation-toggle
Open

Feat: Add option to skip confirmations#52
Alphan-Aksoyoglu wants to merge 2 commits intoprime-run:masterfrom
Alphan-Aksoyoglu:add-confirmation-toggle

Conversation

@Alphan-Aksoyoglu
Copy link
Copy Markdown

Feat: Add option to skip confirmations

Allows users to skip confirmation prompts for deleting or archiving tasks. Configured via a new skip_confirmations setting in a ~/.togo/config.json file, or by using the --skip-confirmations (or -y) command-line flag.

Changes Made

  • Configuration File:

    • A new config package has been added to manage a ~/.togo/config.json file.
    • The skip_confirmations setting is loaded from this file at startup and saved whenever it is changed in the UI.
  • Command-Line Flag:

    • A --skip-confirmations (-y) flag has been added. If used, it overrides the value in the configuration file.
  • UI Toggle:

    • Pressing 'c' in the UI now toggles the "skip confirmations" setting.
    • The current status of the setting ("on" or "off") is displayed in the status bar.
    • Changes made via the UI are persisted in the configuration file.

How to Use

  1. To enable by default:

    • Create a file at ~/.togo/config.json with the following content:
      {
        "skip_confirmations": true
      }
  2. To enable for a single command:

    • Use the -y or --skip-confirmations flag:
      togo -y
  3. To toggle in the UI:

    • Press 'c' while the application is running.

Allows users to skip confirmation prompts for deleting or archiving tasks.
Configured via a new `skip_confirmations` setting in a `~/.togo/config.json` file,
or by using the `--skip-confirmations` (or `-y`) command-line flag.

#### Changes Made

*   **Configuration File:**
    *   A new `config` package has been added to manage a `~/.togo/config.json` file.
    *   The `skip_confirmations` setting is loaded from this file at startup and saved whenever it is changed in the UI.

*   **Command-Line Flag:**
    *   A `--skip-confirmations` (`-y`) flag has been added. If used, it overrides the value in the configuration file.

*   **UI Toggle:**
    *   Pressing 'c' in the UI now toggles the "skip confirmations" setting.
    *   The current status of the setting ("on" or "off") is displayed in the status bar.
    *   Changes made via the UI are persisted in the configuration file.

#### How to Use

1.  **To enable by default:**
    *   Create a file at `~/.togo/config.json` with the following content:
        ```json
        {
          "skip_confirmations": true
        }
        ```

2.  **To enable for a single command:**
    *   Use the `-y` or `--skip-confirmations` flag:
        ```bash
        togo -y
        ```

3.  **To toggle in the UI:**
    *   Press 'c' while the application is running.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant