On Tue, May 02, 2000 at 04:23:07PM -0700, [EMAIL PROTECTED] wrote:
> > I can add closure matching TERM variable. So that you could do:
> > set prompt/xterm* "..."
>
> Yes, I wasn't thinking about that. It would actually fit in the whole
> concept lftp is using. I like this idea.. Now if you can implement it :-)
Patch is attached. It will be in the next version.
--
Alexander. (never mind that noise you heard)
Index: CmdExec.cc
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/CmdExec.cc,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- CmdExec.cc 2000/04/23 14:57:10 1.59
+++ CmdExec.cc 2000/05/02 17:39:05 1.60
@@ -18,7 +18,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: CmdExec.cc,v 1.59 2000/04/23 14:57:10 lav Exp $ */
+/* $Id: CmdExec.cc,v 1.60 2000/05/02 17:39:05 lav Exp $ */
#include <config.h>
#include <errno.h>
@@ -734,7 +734,6 @@
SaveCWD();
var_ls=xstrdup("");
- var_prompt=xstrdup("lftp> ");
remote_completion=false;
long_running=0;
csh_history=false;
@@ -806,7 +805,7 @@
char *store=prompt;
- char *scan=var_prompt;
+ const char *scan=res_prompt.Query(getenv("TERM"));
char ch;
char str[3];
const char *to_add;
@@ -953,8 +952,6 @@
csh_history = res_csh_history.Query(0);
xfree(var_ls);
var_ls=xstrdup(res_default_ls.Query(c));
- xfree(var_prompt);
- var_prompt=xstrdup(res_prompt.Query(c));
verify_path=res_verify_path.Query(c);
verify_host=res_verify_host.Query(c);
verbose=res_verbose.Query(0);
Index: CmdExec.h
===================================================================
RCS file: /home/lav/cvsroot/lftp/src/CmdExec.h,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -r1.33 -r1.34
--- CmdExec.h 2000/04/12 18:51:39 1.33
+++ CmdExec.h 2000/05/02 17:39:05 1.34
@@ -18,7 +18,7 @@
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
-/* $Id: CmdExec.h,v 1.33 2000/04/12 18:51:39 lav Exp $ */
+/* $Id: CmdExec.h,v 1.34 2000/05/02 17:39:05 lav Exp $ */
#ifndef CMDEXEC_H
#define CMDEXEC_H
@@ -171,7 +171,6 @@
static const char *GetFullCommandName(const char *);
char *var_ls;
- char *var_prompt;
bool remote_completion;
int long_running;
bool csh_history;