GNUAspell/aspell

Add option to cause abort exit with error

Opened this issue · 4 comments

Using aspell in shell scripts, we may want to exit the script early depending on how the aspell check turned out.

Exit with success is sensible after the user stepped through the whole file, and also after x-exiting.

However, when b-aborting we would expect an exit with error. Unfortunately, aspell check seems to always exit with success.

Please change this behaviour, or add an option (--abort-is-error?) so users can change the behaviour if needed.

I think it makes sense to exit with an error when aborting. I don't see how that can break anything so an option is an overkill.

nk9 commented

Would really like to use this. Using aspell to check multiple files right now requires you to abort out of all of them in sequence. (See Superuser question.) With tens to hundreds of files this is impractical. Is there anything holding this back from being merged and, ideally, released?

@kevina, out of curiosity, how did you choose the value of 63 as the abort return value?

kevina commented

Nothing is holding it back, I just need to get to it.

@nk9, I do not remember why I chose 63, but I must have had a reason, so for now I will leave it at 63.

nk9 commented

Just checking in on this again. :-) Thanks for your work on this project, let me know if I can help test or anything.

Update: Ah, I see this has been assigned a milestone of 0.60.9 which has other outstanding issues still to be resolved. 👍