[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How get last commnda history line number directly
From: |
Greg Wooledge |
Subject: |
Re: How get last commnda history line number directly |
Date: |
Tue, 8 Sep 2020 08:11:21 -0400 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
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.