From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6448 invoked from network); 22 Mar 1997 16:41:35 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 22 Mar 1997 16:41:35 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id LAA14093; Sat, 22 Mar 1997 11:34:33 -0500 (EST) Resent-Date: Sat, 22 Mar 1997 11:34:33 -0500 (EST) Date: Sat, 22 Mar 1997 16:37:09 GMT From: Zefram Message-Id: <13377.199703221637@stone.dcs.warwick.ac.uk> Subject: -L option for umask X-Patch: 222 Resent-Message-ID: <"x4Agi3.0.8S3.Oe0Dp"@euclid> To: zsh-workers@math.gatech.edu Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/3017 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----BEGIN PGP SIGNED MESSAGE----- This is an updated form of patch 721, which didn't get into the baseline at that time. -zefram *** Doc/Zsh/builtins.yo 1997/03/22 14:18:58 1.11 --- Doc/Zsh/builtins.yo 1997/03/22 14:24:37 *************** *** 1107,1120 **** ) findex(umask) cindex(umask) ! item(tt(umask) [ tt(-S) ] [ var(mask) ])( The umask is set to var(mask). var(mask) can be either an octal number or a symbolic value as described in manref(chmod)(1). ! If var(mask) is omitted, the current value is printed. The tt(-S) ! option causes the mask to be printed as a symbolic value. Otherwise, ! the mask is printed as an octal number. Note that in the symbolic form the permissions you specify are those which are to be allowed (not denied) to the users specified. ) cindex(aliases, removing) alias(unalias)(unhash -a) --- 1107,1123 ---- ) findex(umask) cindex(umask) ! item(tt(umask) [ tt(-SL) ] [ var(mask) ])( The umask is set to var(mask). var(mask) can be either an octal number or a symbolic value as described in manref(chmod)(1). ! Note that in the symbolic form the permissions you specify are those which are to be allowed (not denied) to the users specified. + + If var(mask) is omitted, the current value is printed. The tt(-S) + option causes the mask to be printed as a symbolic value. Otherwise, + the mask is printed as an octal number. The tt(-L) option causes the + report to be in the form of a tt(umask) command. ) cindex(aliases, removing) alias(unalias)(unhash -a) *** Src/builtin.c 1997/03/22 14:19:08 1.65 --- Src/builtin.c 1997/03/22 14:22:45 *************** *** 3436,3441 **** --- 3436,3443 ---- umask(um); /* No arguments means to display the current setting. */ if (!s) { + if(ops['L']) + fputs("umask ", stdout); if (ops['S']) { char *who = "ugo"; *** Src/hashtable.h 1997/03/22 14:19:11 1.29 --- Src/hashtable.h 1997/03/22 14:23:28 *************** *** 337,343 **** {NULL, "type", 0, bin_whence, 0, -1, 0, "ampf", "v"}, {NULL, "typeset", BINF_TYPEOPTS | BINF_MAGICEQUALS | BINF_PSPECIAL, bin_typeset, 0, -1, 0, "LRUZfilrtuxm", NULL}, {NULL, "ulimit", 0, bin_ulimit, 0, -1, 0, NULL, NULL}, ! {NULL, "umask", 0, bin_umask, 0, 1, 0, "S", NULL}, {NULL, "unalias", 0, bin_unhash, 1, -1, 0, "m", "a"}, {NULL, "unfunction", 0, bin_unhash, 1, -1, 0, "m", "f"}, {NULL, "unhash", 0, bin_unhash, 1, -1, 0, "adfm", NULL}, --- 337,343 ---- {NULL, "type", 0, bin_whence, 0, -1, 0, "ampf", "v"}, {NULL, "typeset", BINF_TYPEOPTS | BINF_MAGICEQUALS | BINF_PSPECIAL, bin_typeset, 0, -1, 0, "LRUZfilrtuxm", NULL}, {NULL, "ulimit", 0, bin_ulimit, 0, -1, 0, NULL, NULL}, ! {NULL, "umask", 0, bin_umask, 0, 1, 0, "SL", NULL}, {NULL, "unalias", 0, bin_unhash, 1, -1, 0, "m", "a"}, {NULL, "unfunction", 0, bin_unhash, 1, -1, 0, "m", "f"}, {NULL, "unhash", 0, bin_unhash, 1, -1, 0, "adfm", NULL}, -----BEGIN PGP SIGNATURE----- Version: 2.6.3ia Charset: ascii iQCVAwUBMzPtOHD/+HJTpU/hAQGymQP/WQFXo5LqGS4V0mTHUB602QrLOTRc34yI sNjIrz6yKbNSUSkIGicImNErCOTE2koliwD3q0Q/mS+sOEjQkaqeSD2VYGh+XLMr n9lI93Fo+otA2BBO6PMScg/W+6Mxs4gcEctZ8hSVuFcIgDjbza6s7gQGoMZSzSDc bgSEhIp0a4A= =oEFW -----END PGP SIGNATURE-----