add support for non-posix shells

Implementation with long options, see #14 for details.