From: Janos Farkas <chexum@shadow.banki.hu>
To: zsh-workers@math.gatech.edu
Subject: umask builtin with unfortunate args
Date: Sat, 24 Aug 1996 18:41:23 +0200 (MET DST) [thread overview]
Message-ID: <Pine.LNX.3.93.960824183821.2742B-100000@shadow.banki.hu> (raw)
Another trivial feature-fix; the result of a mistyped umask command :)
Let's take a look at a bored user at the keyboard:
iceq% umask e
umask: bad symbolic mode operator: e
[Ok, that makes sense, but let's look at it closer...]
iceq% umask ""
umask: bad symbolic mode operator: ^@
[That's almost ok, I wanted it to puke...]
iceq% umask g
umask: bad symbolic mode operator: ^@
[What?]
iceq% umask a
umask: bad symbolic mode operator: ^@
[And this is really not straightforward... :)]
See for trivial fix at the end... Or maybe, would it be better to
`quote' that character? I'm thinking of an umask " ".
[BTW, this is happening almost exactly in bash too.. :)]
Janos
A ChangeLog entry guess...
* Src/builtin.c: umask reported not sensible errors for some
incorrect parameters.
diff -urN zsh-3.0-pre1.orig/Src/builtin.c zsh-3.0-pre1/Src/builtin.c
--- zsh-3.0-pre1.orig/Src/builtin.c Fri Jun 28 15:43:49 1996
+++ zsh-3.0-pre1/Src/builtin.c Fri Jun 28 23:15:55 1996
@@ -5481,7 +5483,10 @@
/* Operation may be +, - or =. */
umaskop = (int)*s;
if (!(umaskop == '+' || umaskop == '-' || umaskop == '=')) {
- zwarnnam(nam, "bad symbolic mode operator: %c", NULL, umaskop);
+ if (umaskop)
+ zwarnnam(nam, "bad symbolic mode operator: %c", NULL, umaskop);
+ else
+ zwarnnam(nam, "bad umask", NULL, 0);
return 1;
}
/* Permissions mask -- r=read, w=write, x=execute. */
reply other threads:[~1996-08-24 16:47 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.3.93.960824183821.2742B-100000@shadow.banki.hu \
--to=chexum@shadow.banki.hu \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).