Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: histlexwords error with >! token
- X-seq: zsh-workers 34389
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: histlexwords error with >! token
- Date: Sun, 25 Jan 2015 11:59:05 -0800
- In-reply-to: <CAHYJk3SFKw+gUCbu9gKWKxSo_MPNm1Qcwj6xrWvZLk8N=WSXSg@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHYJk3SFKw+gUCbu9gKWKxSo_MPNm1Qcwj6xrWvZLk8N=WSXSg@mail.gmail.com>
On Jan 25, 7:52pm, Mikael Magnusson wrote:
} Subject: histlexwords error with >! token
}
} Even though the code appears to specially handle it, I still get this error,
} hist.c:3477: bad(1) wordsplit reading history: echo hello >! /dev/null
} at: >! /dev/null
} word: >|
Try this:
diff --git a/Src/hist.c b/Src/hist.c
index 11d9722..87d0723 100644
--- a/Src/hist.c
+++ b/Src/hist.c
@@ -3452,7 +3452,8 @@ histsplitwords(char *lineptr, short **wordsp, int *nwordsp, int *nwordposp,
if (*lptr == *wptr ||
(*lptr == '!' && *wptr == '|')) {
lptr++;
- wptr++;
+ if (!*++wptr)
+ break;
} else if (lptr[0] == '\\' &&
lptr[1] == '\n') {
/*
Messages sorted by:
Reverse Date,
Date,
Thread,
Author