Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

-M option for umask



-----BEGIN PGP SIGNED MESSAGE-----

This patch adds the -M option to the umask builtin.

 -zefram

      *** 1.5	1996/01/08 07:03:40
      --- Src/builtin.c	1996/01/08 08:32:18
      ***************
      *** 5237,5242 ****
      --- 5237,5244 ----
            umask(um);
            /* No arguments means to display the current setting. */
            if (!s) {
      + 	if(ops['M'])
      + 	    printf("umask ");
        	printf("%03o\n", (unsigned)um);
        	return 0;
            }
      *** 1.3	1996/01/08 07:03:40
      --- Src/hashtable.h	1996/01/08 08:29:47
      ***************
      *** 311,317 ****
            {NULL, "type", 0, bin_whence, 0, -1, 0, "amp", "v"},
            {NULL, "typeset", BINF_TYPEOPTS | BINF_MAGICEQUALS, bin_typeset, 0, -1, 0, "LRZfilrtuxm", NULL},
            {NULL, "ulimit", 0, bin_ulimit, 0, 1, 0, "HSacdflmnopstv", NULL},
      !     {NULL, "umask", 0, bin_umask, 0, 1, 0, NULL, 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},
      --- 311,317 ----
            {NULL, "type", 0, bin_whence, 0, -1, 0, "amp", "v"},
            {NULL, "typeset", BINF_TYPEOPTS | BINF_MAGICEQUALS, bin_typeset, 0, -1, 0, "LRZfilrtuxm", NULL},
            {NULL, "ulimit", 0, bin_ulimit, 0, 1, 0, "HSacdflmnopstv", NULL},
      !     {NULL, "umask", 0, bin_umask, 0, 1, 0, "M", 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},
      *** 1.3	1996/01/08 07:03:40
      --- Doc/zshbuiltins.man	1996/01/08 08:37:00
      ***************
      *** 988,999 ****
        .RE
        .PD
        .TP
      ! \fBumask\fP [ \fImask\fP ]
        The umask is set to \fImask\fP.  \fImask\fP can be either
        an octal number or a symbolic value as described in \fBchmod\fP(1).
      ! If \fImask\fP is omitted, the current value is printed.  Note that in
      ! the symbolic form the permissions you specify are those which are to be
      ! allowed (not denied) to the users specified.
        .TP
        \fBunalias\fP [ \-\fBm\fP ] \fIname\fP ...
        The alias definition, if any, for each \fIname\fP is removed.
      --- 988,1004 ----
        .RE
        .PD
        .TP
      ! \fBumask\fP [ \-\fBM\fP ] [ \fImask\fP ]
        The umask is set to \fImask\fP.  \fImask\fP can be either
        an octal number or a symbolic value as described in \fBchmod\fP(1).
      ! Note that in the symbolic form the permissions you specify are those
      ! which are to be
      ! .I allowed
      ! (not denied) to the users specified.
      ! If \fImask\fP is omitted, the current value is printed.  
      ! The \-\fBM\fP option causes the value to be printed in the form of a
      ! .B umask
      ! command.
        .TP
        \fBunalias\fP [ \-\fBm\fP ] \fIname\fP ...
        The alias definition, if any, for each \fIname\fP is removed.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQCVAgUBMPDeF3D/+HJTpU/hAQFtPgQAjnXvy8oqDYEMmi2rMIseHByyjnFoebbY
iZGhnp2TqJI/GYVi9zNy87dvoGPX8tPJpzyPde9dxYI/NzP45VvNYKrB1FsqSi2d
HcV39nAaJWonbANNWd/NOw6QFhMKJ1bPt9lnPsxOrcMdu7LYbMdbee1FcwzBCmPJ
oKzL1IQZS2k=
=JgFb
-----END PGP SIGNATURE-----



Messages sorted by: Reverse Date, Date, Thread, Author