Scott Dwyer wrote:
Having to press return twice is about the worst idea suggested
here. How do you press return twice from inside a script? At least
using an option, or even a funny character, instead of the mapfile
is scriptable.

I think you missed where I said that only happens if you forget to
type the option on the command line.

Yes, sorry. But I have also said that I won't add an option to override the absence of the mapfile.


For instance, right now if a user forgets to add the option --force
when writing to a device, it stops and requires the command to be
re-entered with the proper option. I am only suggesting that instead
of exiting, it puts up a warning with the option to hit enter to
continue.

Exiting with nonzero status is ok for scripting, blocking ddrescue
waiting for a keystroke is not (unless requested with --ask, that is). When a command is incomplete, one expects the tool to exit, not to block:

$ cp in ; echo $?
cp: missing destination file operand after `in'
Try `cp --help' for more information.
1


Best regards,
Antonio.

_______________________________________________
Bug-ddrescue mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-ddrescue

Reply via email to