zsh-users
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: luomat@nerc.com
Cc: zsh-users@math.gatech.edu
Subject: Re: zsh 3pre2: carriage return in prompt
Date: Thu, 11 Jul 1996 15:55:42 +0200 (MET DST)	[thread overview]
Message-ID: <199607111355.PAA02107@bolyai.cs.elte.hu> (raw)
In-Reply-To: <199607110601.CAA00860@nerc.com> from "Timothy J. Luoma" at "Jul 11, 96 02:01:31 am"

> 
> I had been using this as my prompt:
> 
> PROMPT='[%h] [OLD: $OLDPWD] [CURRENT: %~] $(echo "\n")'
> 
> That gave me the information I wanted, and a carriage return at the  
> end of the line, so my commands always began at the left margin.
> 
> This no longer works with 3.pre2.  Has something changed that makes  
> this impossible? All I want is something that looks like this:

Yes.  Quote from man zshexpn:

COMMAND SUBSTITUTION
       A  command  enclosed  in  parentheses preceded by a dollar
       sign, like so: $(...) or quoted with grave accents:  `...`
       is  replaced  with  its standard output, with any trailing
       newlines deleted.

But really using $(echo "\n") is a quite expensive solution.  It requires a
fork().  You can just simply write

PROMPT='[%h] [OLD: $OLDPWD] [CURRENT: %~]
'

If you use csh_junkie_paren, turn it of, or put a backslash at the end of
the line.

Zoltan



  reply	other threads:[~1996-07-11 14:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-07-11  6:01 Timothy J. Luoma
1996-07-11 13:55 ` Zoltan Hidvegi [this message]
1996-07-11 16:47   ` Timothy J. Luoma
1996-07-11 17:51     ` On the topic of prompts DeWitt Clinton
1996-07-11 23:00       ` Bart Schaefer
1996-07-12 18:36         ` Jose Unpingco
1996-07-13  2:42           ` Bart Schaefer
1996-07-16  6:25           ` Nikita Borisov

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=199607111355.PAA02107@bolyai.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=luomat@nerc.com \
    --cc=zsh-users@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).