Index: src/CmdExec.cc
===================================================================
--- src/CmdExec.cc.orig
+++ src/CmdExec.cc
@@ -1233,6 +1233,38 @@ void CmdExec::ChangeSession(FileAccess *
       ConnectionSlot::Set(slot,session);
 }
 
+void CmdExec::RegisterCompatCommand(const char *name,cmd_creator_t creator,const char *short_desc,const char *long_desc)
+{
+   if(dyn_cmd_table==0)
+   {
+      int count=0;
+      for(const cmd_rec *c=static_cmd_table; c->name; c++)
+        count++;
+      dyn_cmd_table.nset(static_cmd_table,count);
+   }
+   for(int i=0; i<dyn_cmd_table.count(); i++)
+   {
+      cmd_rec *const c=&dyn_cmd_table[i];
+      if(!strcmp(c->name,name))
+      {
+          char *lftp_name=(char*)malloc(5+strlen(name)+1);
+          char *short_d = NULL;
+
+          if (c->short_desc) {
+              short_d = (char*)malloc(5+strlen(c->short_desc)+1);
+              sprintf(short_d, "lftp-%s", c->short_desc);
+              c->short_desc = short_d;
+          }
+
+          sprintf(lftp_name, "lftp-%s", name);
+          c->name = lftp_name;
+            break;
+       }
+   }
+   cmd_rec new_entry={name,creator,short_desc,long_desc};
+   dyn_cmd_table.append(new_entry);
+}
+
 const char *CmdExec::CmdByIndex(int i)
 {
    if(dyn_cmd_table)
Index: src/CmdExec.h
===================================================================
--- src/CmdExec.h.orig
+++ src/CmdExec.h
@@ -238,6 +238,9 @@ public:
    static void RegisterCommand(const char *name,cmd_creator_t creator,
       const char *short_name=0,const char *long_name=0);
 
+   static void RegisterCompatCommand(const char *name,cmd_creator_t creator,
+      const char *short_name=0,const char *long_name=0);
+
    Job *builtin_lcd();
    Job *builtin_cd();
    Job *builtin_open();
Index: src/CopyJob.cc
===================================================================
--- src/CopyJob.cc.orig
+++ src/CopyJob.cc
@@ -18,6 +18,7 @@
  */
 
 #include <config.h>
+#include <unistd.h>
 #include "CopyJob.h"
 #include "ArgV.h"
 #include "plural.h"
@@ -259,7 +260,7 @@ void CopyJobEnv::SetCopier(FileCopy *c,c
 
 xstring& CopyJobEnv::FormatFinalWithPrefix(xstring& s,const char *p)
 {
-   if(no_status)
+   if(no_status || !isatty(1))
       return s;
    if(count==errors)
       return s;
Index: src/Makefile.am
===================================================================
--- src/Makefile.am.orig
+++ src/Makefile.am
@@ -1,6 +1,6 @@
 pkgverlibdir = $(pkglibdir)/$(VERSION)
 
-bin_PROGRAMS = lftp
+bin_PROGRAMS = lftp lftp_wrapper
 bin_SCRIPTS = lftpget
 pkgdata_SCRIPTS = import-ncftp import-netscape verify-file convert-mozilla-cookies xdg-move
 noinst_SCRIPTS = ftpget
@@ -8,9 +8,10 @@ noinst_SCRIPTS = ftpget
 EXTRA_DIST = $(pkgdata_SCRIPTS) $(bin_SCRIPTS) $(noinst_SCRIPTS)
 
 lftp_SOURCES = lftp.cc complete.h complete.cc lftp_rl.c lftp_rl.h attach.cc attach.h
+lftp_wrapper_SOURCES = lftp-wrapper.c
 
 TASK_MODULES = liblftp-pty.la liblftp-network.la proto-ftp.la proto-http.la proto-file.la proto-fish.la proto-sftp.la
-JOB_MODULES = cmd-mirror.la cmd-sleep.la cmd-torrent.la
+JOB_MODULES = cmd-mirror.la cmd-sleep.la cmd-torrent.la cmd-edit.la compat-mode.la
 if WITH_MODULES
   pkgverlib_LTLIBRARIES = $(TASK_MODULES) $(JOB_MODULES)
 else
@@ -30,6 +31,8 @@ cmd_mirror_la_SOURCES = MirrorJob.cc Mir
 cmd_sleep_la_SOURCES  = SleepJob.cc SleepJob.h
 cmd_torrent_la_SOURCES= Torrent.cc Torrent.h TorrentTracker.cc TorrentTracker.h\
  DHT.cc DHT.h Bencode.cc Bencode.h
+cmd_edit_la_SOURCES   = cmd-edit.cc
+compat_mode_la_SOURCES= CompatMode.cc CompatMode.h
 liblftp_pty_la_SOURCES     = PtyShell.cc PtyShell.h lftp_pty.c lftp_pty.h SSH_Access.cc SSH_Access.h
 liblftp_network_la_SOURCES = NetAccess.cc NetAccess.h Resolver.cc Resolver.h\
  lftp_ssl.cc lftp_ssl.h buffer_ssl.cc buffer_ssl.h RateLimit.cc RateLimit.h\
@@ -49,6 +52,8 @@ proto_sftp_la_LDFLAGS = -module -avoid-v
 cmd_mirror_la_LDFLAGS = -module -avoid-version -rpath $(pkgverlibdir)
 cmd_sleep_la_LDFLAGS  = -module -avoid-version -rpath $(pkgverlibdir)
 cmd_torrent_la_LDFLAGS= -module -avoid-version -rpath $(pkgverlibdir)
+cmd_edit_la_LDFLAGS  = -module -avoid-version -rpath $(pkgverlibdir)
+compat_mode_la_LDFLAGS  = -module -avoid-version -rpath $(pkgverlibdir)
 liblftp_pty_la_LDFLAGS     = -avoid-version -rpath $(pkgverlibdir)
 liblftp_network_la_CPPFLAGS = $(AM_CPPFLAGS) $(ZLIB_CPPFLAGS) $(OPENSSL_CPPFLAGS) $(LIBGNUTLS_CFLAGS)
 liblftp_network_la_LDFLAGS = -avoid-version -rpath $(pkgverlibdir)
@@ -98,6 +103,9 @@ lftp_LDFLAGS = -export-dynamic
 lftp_LDADD = liblftp-jobs.la liblftp-tasks.la $(READLINE_LDFLAGS) $(READLINE_LIBS)
 lftp_DEPENDENCIES = liblftp-jobs.la
 
+lftp_wrapper_LDADD = $(GNULIB)
+lftp_wrapper_DEPENDENCIES =
+
 CLEANFILES = *.la
 
 AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/trio
