add support for non-posix shells

Implementation with short options, see #14 for details.