If the pathname is NULL, emit prompts and read from stdin.
Use the last component of the pathname as the `filename' argument to showError.
Get the prompt from the IOCSH_PS1 environment variable or use default "iocsh> ".
Return 0 on success. Print message and return -1 on failure (e.g. can't open file).
If using readline, get history size from IOCSH_HISTSIZE environment variable.