Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: unknown user error
- X-seq: zsh-workers 43090
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: "John, Michael" <Michael.John@xxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: unknown user error
- Date: Fri, 22 Jun 2018 16:20:55 +0000
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=q8U9l7 XkfK1y95cMYzVsNS2KfaBZ8HUjxkJ+vSJ6+Po=; b=Kwg8JB/e1dhvYs1aK2QI7v jPXkFNXR9yuiBIKPSkUlfDYlOIqIW892n8kkMhoFlzTTjbkNBFqQVnlcGdr0T6N+ LYRBH7XChrjyVijBQc1thj53BCGS7Z7wqkDSnVUYIT2IsgRxnVisVALeZlpyNrrG xIdqjYTm2ymTE3ggnaDU1S5Y9YUHmp7LRyOd7hSmOkiZZGLKxLqKj/A9fY63r02a mSbj+d2VW26aPFpYuFZFTuN5Hh1czz/2eS/ZonIxnXIZfS/KC0SxzQ+IgPUIwQj0 1GRyXmhUzIf+Oong5IAJVgC/JFYK/DLOtbuUXkBZ5lGXdh36vmdTzUzu98+AiRnA ==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=q8U9l7 XkfK1y95cMYzVsNS2KfaBZ8HUjxkJ+vSJ6+Po=; b=ZD/NTVdMAVZ4dwkFJGwssS NzUSt0MtoRIDXBF/Z5pUazeWMZSpnRL2ctYn9I/KqRr15NiyW+8tniGXcNRlfgyS 0UBr+pgA7BPu8aLpsp2U7uGlEJu3uK4p572tzxasKt3xdqcH48+0UJZBvZ61okhn Lq1kMsul0zCORV/mEkJSdcwB1TjPIQpSrTlToRnjF1pv2WEJ6mKT27H8K6DENK5R gYI681AvjCVN8QviW8dFHW1WQEXaK6JKd8obVPQ9UF+w1pio8xC8UQM8ypEchxVL rYQD0rNDvOZm6gCRSofg3xa8Da8GF97AD0mXefQbqlqLL6YusnsrtSuKoFe5zkgQ ==
- In-reply-to: <BYAPR07MB464776FCD03668F17DBBA59598750@BYAPR07MB4647.namprd07.prod.outlook.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>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <BYAPR07MB464776FCD03668F17DBBA59598750@BYAPR07MB4647.namprd07.prod.outlook.com>
John, Michael wrote on Fri, 22 Jun 2018 14:48 +0000:
> $ export path=(/usr/local/bin /usr/local/sbin /usr/local/go/bin [...] /usr/lib/jvm/java-8-oracle/jre/bin)
> zsh: unknown user
Let's expand that error message. Patch attached.
From 35d5c64dbff1954f80a9039f6075ace9cec9bb9e Mon Sep 17 00:00:00 2001
From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
Date: Fri, 22 Jun 2018 16:19:46 +0000
Subject: [PATCH] In the (u) glob qualifier, expand and correct "unknown user"
error messages.
---
Src/glob.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/Src/glob.c b/Src/glob.c
index 66a95329f..eb4b1ea17 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -1455,13 +1455,15 @@ zglob(LinkList list, LinkNode np, int nountok)
if ((pw = getpwnam(s + arglen)))
data = pw->pw_uid;
else {
- zerr("unknown user");
+ zerr("unknown user: %s", s + arglen);
data = 0;
}
*tt = sav;
#else /* !USE_GETPWNAM */
sav = *tt;
- zerr("unknown user");
+ *tt = '\0';
+ zerr("unable to resolve non-numeric username '%s'", s + arglen);
+ *tt = sav;
data = 0;
#endif /* !USE_GETPWNAM */
if (sav)
Messages sorted by:
Reverse Date,
Date,
Thread,
Author