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

Re: prompt quoting question



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