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

prompt emulation



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

This patch changes the default prompt to "$ " or "# ", and the default
secondary prompt to "> ", when emulating sh or ksh.  (I also have plans
for an emulation option to disable % prompt sequences.)

 -zefram

      *** Src/init.c	1997/03/17 00:38:09	1.40
      --- Src/init.c	1997/03/19 00:16:13
      ***************
      *** 446,457 ****
        #endif
        
            /* Set default prompts */
      !     if (opts[INTERACTIVE]) {
      ! 	prompt  = ztrdup("%m%# ");
      ! 	prompt2 = ztrdup("%_> ");
      !     } else {
        	prompt = ztrdup("");
        	prompt2 = ztrdup("");
            }
            prompt3 = ztrdup("?# ");
            prompt4 = ztrdup("+ ");
      --- 446,460 ----
        #endif
        
            /* Set default prompts */
      !     if(unset(INTERACTIVE)) {
        	prompt = ztrdup("");
        	prompt2 = ztrdup("");
      +     } else if (emulation == EMULATE_KSH || emulation == EMULATE_SH) {
      + 	prompt  = ztrdup(geteuid() ? "$ " : "# ");
      + 	prompt2 = ztrdup("> ");
      +     } else {
      + 	prompt  = ztrdup("%m%# ");
      + 	prompt2 = ztrdup("%_> ");
            }
            prompt3 = ztrdup("?# ");
            prompt4 = ztrdup("+ ");

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

iQCVAwUBMy8zmXD/+HJTpU/hAQGxpAQAuqjnHVUSeUPzBFNnprM07GJZVAufFRh2
OyUmC4K6iuyM/mVqERTx4QdP0VVTKgOMonMN8VXiN8NhS9boPEqm4utbsH0odOn0
RHFMlS4GBXJSWqFuvL6b/OuuAjn6l8KtrxaUPUxqAxS47w/YFn+PzF6GzBuF4Cky
1jDsCHs2I9o=
=OC7f
-----END PGP SIGNATURE-----



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