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

bash options



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

This patch adds seven option aliases for bash compatibility.  I made
no distinction between bash's "shopt" and "set -o" options -- in bash
these are completely disjoint sets, but in zsh these have always been
the same set.

I think we might want to consider using some of the option aliases as
canonical names.  In particular:

BRACE_EXPAND (NO_IGNORE_BRACES)
	More positive concept.
HIST_APPEND (APPEND_HISTORY)
	More consistent with the other HIST_* options.
ONE_CMD (SINGLE_COMMAND)
	Just as good a name, shorter, and SINGLE_COMMAND is quite new.
STDIN (SHIN_STDIN)
	Clearer name.

Of course, swapping the canonical name and alias won't change most
operations of the shell; it will only affect output and the documentation.
Comments?

 -zefram

      *** Src/options.c	1997/03/19 00:24:46	1.7
      --- Src/options.c	1997/03/23 01:12:46
      ***************
      *** 170,179 ****
        {NULL, "verbose",	      0,			 VERBOSE},
        {NULL, "xtrace",	      0,			 XTRACE},
        {NULL, "zle",		      OPT_SPECIAL,		 USEZLE},
      ! {NULL, "braceexpand",	      OPT_ALIAS,		 -IGNOREBRACES},
      ! {NULL, "physical",	      OPT_ALIAS,		 CHASELINKS},
      ! {NULL, "stdin",		      OPT_ALIAS,		 SHINSTDIN},
      ! {NULL, "trackall",	      OPT_ALIAS,		 HASHCMDS},
        {NULL, NULL, 0, 0}
        };
        
      --- 170,186 ----
        {NULL, "verbose",	      0,			 VERBOSE},
        {NULL, "xtrace",	      0,			 XTRACE},
        {NULL, "zle",		      OPT_SPECIAL,		 USEZLE},
      ! {NULL, "braceexpand",	      OPT_ALIAS, /* ksh/bash */	 -IGNOREBRACES},
      ! {NULL, "dotglob",	      OPT_ALIAS, /* bash */	 GLOBDOTS},
      ! {NULL, "hashall",	      OPT_ALIAS, /* bash */	 HASHCMDS},
      ! {NULL, "histappend",	      OPT_ALIAS, /* bash */	 APPENDHISTORY},
      ! {NULL, "histexpand",	      OPT_ALIAS, /* bash */	 BANGHIST},
      ! {NULL, "mailwarn",	      OPT_ALIAS, /* bash */	 MAILWARNING},
      ! {NULL, "onecmd",	      OPT_ALIAS, /* bash */	 SINGLECOMMAND},
      ! {NULL, "physical",	      OPT_ALIAS, /* ksh/bash */	 CHASELINKS},
      ! {NULL, "promptvars",	      OPT_ALIAS, /* bash */	 PROMPTSUBST},
      ! {NULL, "stdin",		      OPT_ALIAS, /* ksh */	 SHINSTDIN},
      ! {NULL, "trackall",	      OPT_ALIAS, /* ksh */	 HASHCMDS},
        {NULL, NULL, 0, 0}
        };
        
      *** Doc/Zsh/options.yo	1997/03/17 14:23:28	1.8
      --- Doc/Zsh/options.yo	1997/03/23 01:17:14
      ***************
      *** 838,849 ****
        pindex(BRACE_EXPAND)
        item(tt(BRACE_EXPAND))(
        em(NO_)tt(IGNORE_BRACES)
      ! (ksh compatibility)
        )
        pindex(PHYSICAL)
        item(tt(PHYSICAL))(
        tt(CHASE_LINKS)
      ! (ksh compatibility)
        )
        pindex(STDIN)
        item(tt(STDIN))(
      --- 838,884 ----
        pindex(BRACE_EXPAND)
        item(tt(BRACE_EXPAND))(
        em(NO_)tt(IGNORE_BRACES)
      ! (ksh and bash compatibility)
      ! )
      ! pindex(DOT_GLOB)
      ! item(tt(DOT_GLOB))(
      ! tt(GLOB_DOTS)
      ! (bash compatibility)
      ! )
      ! pindex(HASH_ALL)
      ! item(tt(HASH_ALL))(
      ! tt(HASH_CMDS)
      ! (bash compatibility)
      ! )
      ! pindex(HIST_APPEND)
      ! item(tt(HIST_APPEND))(
      ! tt(APPEND_HISTORY)
      ! (bash compatibility)
      ! )
      ! pindex(HIST_EXPAND)
      ! item(tt(HIST_EXPAND))(
      ! tt(BANG_HIST)
      ! (bash compatibility)
      ! )
      ! pindex(MAIL_WARN)
      ! item(tt(MAIL_WARN))(
      ! tt(MAIL_WARNING)
      ! (bash compatibility)
      ! )
      ! pindex(ONE_CMD)
      ! item(tt(ONE_CMD))(
      ! tt(SINGLE_COMMAND)
      ! (bash compatibility)
        )
        pindex(PHYSICAL)
        item(tt(PHYSICAL))(
        tt(CHASE_LINKS)
      ! (ksh and bash compatibility)
      ! )
      ! pindex(PROMPT_VARS)
      ! item(tt(PROMPT_VARS))(
      ! tt(PROMPT_SUBST)
      ! (bash compatibility)
        )
        pindex(STDIN)
        item(tt(STDIN))(

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia
Charset: ascii

iQCVAwUBMzSKpHD/+HJTpU/hAQGYpAP/Y3tHq8OF3VZE/tbl2cAccBEoBWRfH4wU
Rtv5SOx8myZDt4SycpGk+wv2nEzdlMRCfXQrjzlQI3DrJz/0yAOb09OyxkVq59Ag
z/Hkx6iM0k3LxefM9hphjH+DHFeZou3zW8tmHbwFq4GzhIOX6akA6kf7imBBQ/m7
f087j3Yq5Pw=
=owx3
-----END PGP SIGNATURE-----



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