Implement --edit, solves #53