clarkperkins / click-shell

An extension to click that easily turns your click app into a shell utility
BSD 3-Clause "New" or "Revised" License
90 stars 17 forks source link

Call on_finished when running traditional command not in shell mode #25

Closed bdoyle0182 closed 3 years ago

bdoyle0182 commented 4 years ago

Is it possible to make on_finished run even if we're running a standard click command without entering the click shell? My cli has resources that are opened when running a command and need to be closed after the single command is finished. It's easy in shell mode having on_finished, so would be nice if non-shell single commands could piggy-back and use this as well.

clarkperkins commented 3 years ago

Hi there @bdoyle0182, apologies for the very delayed response, but I think this is a great idea. I'll get it included in the next release.