Command line history & tab-completion for sftp in OS X Terminal.app
Having tried to install with-readline on OSX 10.7.5 I ran into linker errors.
While trying to find a solution to this problem I discovered that MacPorts has a port of OpenSSH which includes the sftp
utility compiled with readline support. MacPorts also sets this version of sftp
as the default.
Check out with-readline. There's an example using sftp there.
You can also try yafc.