There's an existing issue about that. I believe the solution I favored there is not to add an option, but to make it so only the currently visible parts of the task are shared.
This functionality seems niche, so I think the best way to support it would be with an onCompletion lua callback and adding support for sending intents from lua.
A couple of things I'd like...
A settings checkbox to make sharing tasks strip off tags, context, Priority, dates etc. I imagine you'd mostly want to just send task text.
A hook to automatically pop up the share dialogue on task completion. Use case here is tweeting / sending a worklog (I'd like to Tweet most of mine)