zsh-users
 help / color / mirror / code / Atom feed
From: "Preben Guldberg" <c928400@student.dtu.dk>
To: zsh-users@sunsite.dk
Subject: Re: prompt quoting question
Date: Mon, 27 Aug 2001 09:50:25 +0200	[thread overview]
Message-ID: <20010827095025.A7989@student.dtu.dk> (raw)
In-Reply-To: <20010827004932.A11967@panix.com>; from "Russell Hoover" on [010827] at 00:49:32

Thus wrote Russell Hoover (rj@panix.com) den [010827]:

> But when I replace "tty" in the line above with `/usr/bin/tty | sed -e 's/\/dev\/tty//'`
> instead of displaying the tty number, the prompt is messed up:

>                  \e[1;32mMonday  2001/08/27  00:14:45 \e[mv

> and sed gives me an error message:

>                  sed: 1: "s//dev/tty//": bad flag in substitute command: 't'

> It seems to me the problem is in correctly quoting the 's/\/dev\/tty//' : the
> single quotes (within backtics within single quotes) won't cut it.  Any clues
> appreciated.

As for the quoting of the sed command, you could go for, say

    /usr/bin/tty | sed -e s_/dev/tty__

Peppe
-- 
                                      "Before you criticize someone, walk
Preben "Peppe" Guldberg  __/-\__       a mile in his shoes. That way, if
c928400@student.dtu.dk    (o o)        he gets angry, he'll be a mile away
----------------------oOOo (_) oOOo--  - and barefoot."    --Sarah Jackson


  reply	other threads:[~2001-08-27  7:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-27  4:49 Russell Hoover
2001-08-27  7:50 ` Preben Guldberg [this message]
2001-08-27  8:06 ` Bart Schaefer

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=20010827095025.A7989@student.dtu.dk \
    --to=c928400@student.dtu.dk \
    --cc=zsh-users@sunsite.dk \
    /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).