Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: accessing full command line
- X-seq: zsh-workers 367
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: zefram@xxxxxxxxxxxxxxxxx
- Subject: Re: accessing full command line
- Date: Wed, 6 Sep 1995 19:07:56 +0200 (MET DST)
- In-reply-to: <23274.199509061646@xxxxxxxxxxxxxxxxxxxxxxx> from "zefram@xxxxxxxxxxxxxxxxx" at Sep 6, 95 05:46:18 pm
- Sender: hzoli@xxxxxxxxxx
Zefram wrote:
>
> >In my release I disabled up-history from vared. This is the desired behaviour
> >if you use vared to edit a file or a function definition, but I understand
> >that is may be useful in cases you mention. It would be very easy to
> >implement an option controlling this behaviour, and it is much simpler and
> >cleaner than disabling quote removal. Presently all I do is setting the
> >in_vared global variable in builtin.c in function bin_vared() before calling
> >zleread() and reset it to zero after the call. If a new option is
> >introdudced, the only necessary change is to replace the in_vared = 1; line to
> >in_vared = unset(VARED_HISTORY);.
>
> Surely it would be better to add an option to vared to allow history,
> rather than using a global shell option? The patch to do that is even
> trivialer.
You are right. Somehow I forgot about this solution. Here is the patch for
that. It now obsolates the patches I sent a few minutes ago for the
VARED_HISTORY option. Note that the documentation is missing. It is for the
hzoli releases only. After the patch vared -h gives access to the history.
Zoltan
*** 1.28 1995/09/06 16:09:05
--- Src/builtin.c 1995/09/06 17:02:07
***************
*** 192,198 ****
{"unlimit", bin_unlimit, 0, -1, 0, 0, "h", NULL},
{"unset", bin_unset, 1, -1, 0, 0, "m", NULL},
{"unsetopt", bin_setopt, 0, -1, BINF_PLUSOPTS, 1, "0123456789BCDEFGHIJKLMNOPQRSTUWXYZabefghjklmnopsuvwxy", NULL},
! {"vared", bin_vared, 1, 6, 0, 0, NULL, NULL},
{"wait", bin_fg, 0, -1, 0, BIN_WAIT, NULL, NULL},
{"whence", bin_whence, 0, -1, 0, 0, "pvcfam", NULL},
{"where", bin_whence, 0, -1, 0, 0, "pm", "ca"},
--- 192,198 ----
{"unlimit", bin_unlimit, 0, -1, 0, 0, "h", NULL},
{"unset", bin_unset, 1, -1, 0, 0, "m", NULL},
{"unsetopt", bin_setopt, 0, -1, BINF_PLUSOPTS, 1, "0123456789BCDEFGHIJKLMNOPQRSTUWXYZabefghjklmnopsuvwxy", NULL},
! {"vared", bin_vared, 1, 7, 0, 0, NULL, NULL},
{"wait", bin_fg, 0, -1, 0, BIN_WAIT, NULL, NULL},
{"whence", bin_whence, 0, -1, 0, 0, "pvcfam", NULL},
{"where", bin_whence, 0, -1, 0, 0, "pm", "ca"},
***************
*** 3218,3223 ****
--- 3218,3226 ----
return 1;
}
break;
+ case 'h':
+ ops['h'] = 1;
+ break;
default:
/* unrecognised option character */
zwarnnam(name, "unknown option: %s", *args, 0);
***************
*** 3244,3250 ****
permalloc();
pushnode(bufstack, ztrdup(s));
heapalloc();
! in_vared = 1;
t = (char *)zleread(p1, p2);
in_vared = 0;
if (!t || errflag)
--- 3247,3253 ----
permalloc();
pushnode(bufstack, ztrdup(s));
heapalloc();
! in_vared = !ops['h'];
t = (char *)zleread(p1, p2);
in_vared = 0;
if (!t || errflag)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author