Feat: Add option to skip confirmations#52
Open
Alphan-Aksoyoglu wants to merge 2 commits intoprime-run:masterfrom
Open
Feat: Add option to skip confirmations#52Alphan-Aksoyoglu wants to merge 2 commits intoprime-run:masterfrom
Alphan-Aksoyoglu wants to merge 2 commits intoprime-run:masterfrom
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Feat: Add option to skip confirmations
Allows users to skip confirmation prompts for deleting or archiving tasks. Configured via a new
skip_confirmationssetting in a~/.togo/config.jsonfile, or by using the--skip-confirmations(or-y) command-line flag.Changes Made
Configuration File:
configpackage has been added to manage a~/.togo/config.jsonfile.skip_confirmationssetting is loaded from this file at startup and saved whenever it is changed in the UI.Command-Line Flag:
--skip-confirmations(-y) flag has been added. If used, it overrides the value in the configuration file.UI Toggle:
How to Use
To enable by default:
~/.togo/config.jsonwith the following content:{ "skip_confirmations": true }To enable for a single command:
-yor--skip-confirmationsflag:To toggle in the UI: