smart_open will be a proper shell script and a command, not a function.
No need to test for $SHELL. Thanks, @brianloveswords, for sparking a rethink.