mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-08 12:01:21 +02:00
users/13148 (and workers/42060): Abort the command line when replying
"[n] No" to the RM_STAR_SILENT prompt. Patch by Stephane, rebased by Mikael.
This commit is contained in:
parent
972cf4197e
commit
a9e60dc179
2 changed files with 17 additions and 6 deletions
|
@ -1,3 +1,9 @@
|
|||
2017-12-20 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* Stephane (rebased by Mikael): users/13148, workers/42060:
|
||||
Src/exec.c: Abort the command line when replying "[n] No" to
|
||||
the RM_STAR_SILENT prompt.
|
||||
|
||||
2017-12-20 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||
|
||||
* 42143: Completion/Unix/Type/_object_files: fix a pattern for
|
||||
|
|
17
Src/exec.c
17
Src/exec.c
|
@ -3251,19 +3251,24 @@ execcmd_exec(Estate state, Execcmd_params eparams,
|
|||
|
||||
next = nextnode(node);
|
||||
if (s[0] == Star && !s[1]) {
|
||||
if (!checkrmall(pwd))
|
||||
uremnode(args, node);
|
||||
if (!checkrmall(pwd)) {
|
||||
errflag |= ERRFLAG_ERROR;
|
||||
break;
|
||||
}
|
||||
} else if (l >= 2 && s[l - 2] == '/' && s[l - 1] == Star) {
|
||||
char t = s[l - 2];
|
||||
int rmall;
|
||||
|
||||
s[l - 2] = 0;
|
||||
if (!checkrmall(*s ? s : "/"))
|
||||
uremnode(args, node);
|
||||
rmall = checkrmall(s);
|
||||
s[l - 2] = t;
|
||||
|
||||
if (!rmall) {
|
||||
errflag |= ERRFLAG_ERROR;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!nextnode(firstnode(args)))
|
||||
errflag |= ERRFLAG_ERROR;
|
||||
}
|
||||
|
||||
if (type == WC_FUNCDEF) {
|
||||
|
|
Loading…
Reference in a new issue