Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: prompt quoting question
- X-seq: zsh-users 4168
- From: "Preben Guldberg" <c928400@xxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: prompt quoting question
- Date: Mon, 27 Aug 2001 09:50:25 +0200
- In-reply-to: <20010827004932.A11967@xxxxxxxxx>; from "Russell Hoover" on [010827] at 00:49:32
- Mail-followup-to: Preben Peppe Guldberg <c928400@xxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010827004932.A11967@xxxxxxxxx>
- Reply-to: Preben Peppe Guldberg <c928400@xxxxxxxxxxxxxx>
Thus wrote Russell Hoover (rj@xxxxxxxxx) 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@xxxxxxxxxxxxxx (o o) he gets angry, he'll be a mile away
----------------------oOOo (_) oOOo-- - and barefoot." --Sarah Jackson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author