More work on Java shell: edit command