OpenBagTwo / EnderChest

syncing and linking for all your Minecraft instances
https://openbagtwo.github.io/EnderChest/
GNU General Public License v3.0
3 stars 2 forks source link

Enable sync confirmations from the command-line #97

Closed OpenBagTwo closed 1 year ago

OpenBagTwo commented 1 year ago

GIVEN Alex is using EnderChest to sync her Minecraft setups AND while she generally wants to use the standard 5-second confirmation time, this one time she wants to explicitly provide confirmation before carrying out the sync

WHEN she runs the command:

enderchest open --wait prompt

THEN EnderChest will perform a dry run of the open operation, report the high-level summary and then ask for explicit confirmation before proceeding

SO that, in order to enable this behavior, Alex doesn't have to edit her enderchest.cfg file only to revert the change afterwards

Notes

OpenBagTwo commented 1 year ago

I'm dropping the idea for a --wait prompt option in favor of an unambiguous --confirm, because implementing my own "is this an int?" parsing is simply not worth it, especially when argparse's int-handling is so darn snazzy:

$ enderchest close -w seven
usage: enderchest close [-h] [--root ROOT_FLAG] [--verbose] [--quiet] [--dry-run] [--exclude EXCLUDE [EXCLUDE ...]]
                        [--timeout TIMEOUT] [--wait SYNC_CONFIRM_WAIT]
                        [root]
enderchest close: error: argument --wait/-w: invalid int value: 'seven'