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

Re: previous cmd in RPS1



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