Fixing bug introduced with previous commit
Add support for ksh. Also fix/improve doc for other shells