zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <zefram@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu
Subject: prompt emulation
Date: Wed, 19 Mar 1997 18:01:21 GMT	[thread overview]
Message-ID: <22096.199703191801@stone.dcs.warwick.ac.uk> (raw)

-----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-----


                 reply	other threads:[~1997-03-19 18:31 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=22096.199703191801@stone.dcs.warwick.ac.uk \
    --to=zefram@dcs.warwick.ac.uk \
    --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).