On Sun, Sep 06, 2020 at 01:18:22PM -0700, L A Walsh wrote:
> > as it's pure & directly viable in PS1 env. var.
> > PS1=`echo \!`
> ---
> Doesn't work if you don't have '!' support (I generally found
> '!' more often did unwanted things, but I never used csh):

You're talking abuot csh-style history expansion (set -o histexpand),
right?  That has nothing to do with the expansion of \! within PS1.

I've got histexpand disabled, and PS1='\! ' gives the number just fine.

Reply via email to