I think OpenSSH sftp ought to have lrm and lrmdir commands to remove local files and directories respectively. This is useful, for instance, when you download files by mistake. I have implemented those features in the attached patch. I added the options the in-program "Available commands", but not to the man page. I couldn't figure out how the documentation worked, so someone else would need to edit it if that patch is accepted. It has been tested on Kubuntu Edgy GNU/Linux, but I'm fairly sure that patch is portable.
Created attachment 1223 [details] Adds lrm and lrmdir options to sftp
Any reason you don't just use "!rm filename" or "!rmdir filename" ?
That works, but shouldn't be necessary for such a common action. I also think a local rename could be useful.
Thanks, but I don't think we need to do this. Adding extra code to support another way to do something that you can already do (in the same number of keystrokes too) does not seem warranted.
Fair enough. I saw it as standardizing the interface, but it certainly isn't necessary.
Close resolved bugs after release.