Bug #634
- Fixed bug #634, so that 'undo' obeys the 'confirmation' setting (thanks to Steve Rader).
This commit is contained in:
@@ -102,6 +102,8 @@
|
||||
+ Enhanced unit tests in response to bug #624 (thanks to Steve Rader).
|
||||
+ Fixed bug #628, where dateformats containing spaces were not properly
|
||||
parsed (thanks to Steve Rader).
|
||||
+ Fixed bug #634, so that 'undo' obeys the 'confirmation' setting (thanks to
|
||||
Steve Rader).
|
||||
+ Fixed bug #641, where certain reports broke when 'dateformat' differed from
|
||||
'dateformat.report'.
|
||||
+ Fixed bug #651, which broke the edit command when a task description
|
||||
|
||||
@@ -50,7 +50,7 @@ With an ID but no specific command, taskwarrior runs the "info" command.
|
||||
|
||||
.TP
|
||||
.B undo
|
||||
Reverts the most recent action.
|
||||
Reverts the most recent action. Obeys the confirmation setting.
|
||||
|
||||
.TP
|
||||
.B shell
|
||||
|
||||
@@ -196,8 +196,9 @@ Controls some of the verbosity of taskwarrior.
|
||||
.TP
|
||||
.B confirmation=yes
|
||||
May be "yes" or "no", and determines whether taskwarrior will ask for
|
||||
confirmation before deleting a task or doing bulk changes. The default value
|
||||
is "yes".
|
||||
confirmation before deleting a task, performing bulk changes, or the undo
|
||||
command. The default value is "yes". Consider leaving this setting as "no",
|
||||
for safety.
|
||||
|
||||
.TP
|
||||
.B echo.command=yes
|
||||
|
||||
@@ -999,7 +999,8 @@ void TDB::undo ()
|
||||
}
|
||||
|
||||
// Output displayed, now confirm.
|
||||
if (!confirm ("The undo command is not reversible. Are you sure you want to revert to the previous state?"))
|
||||
if (context.config.getBoolean ("confirmation") &&
|
||||
!confirm ("The undo command is not reversible. Are you sure you want to revert to the previous state?"))
|
||||
{
|
||||
std::cout << "No changes made.\n";
|
||||
context.hooks.trigger ("post-undo");
|
||||
|
||||
Reference in New Issue
Block a user