Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: previous cmd in RPS1
- X-seq: zsh-users 9345
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh users <zsh-users@xxxxxxxxxx>
- Subject: Re: previous cmd in RPS1
- Date: Fri, 26 Aug 2005 16:18:52 +0000
- In-reply-to: <20050826093637.GA15060@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20050826093637.GA15060@xxxxxxxxx>
On Aug 26, 11:36am, Miek Gieben wrote:
}
} It there any way to make zsh /not/ to parse my previous cmd but
} just show it as is?
Use the psvar array and the %v prompt replacement.
psvar=( $history[$[${(%):-%h}-1]] )
RPS1="$RPSL%$MAXMID<... <%v$RPSR"
Or -- less good in my opinion -- use promptsubst:
setopt promptsubst
RPSMID=$history[$[${(%):-%h}-1]]
RPS1="$RPSL%$MAXMID<... <"\$RPSMID"$RPSR"
Messages sorted by:
Reverse Date,
Date,
Thread,
Author