Re: How get last commnda history line number directly

2020-09-01 Thread Chet Ramey
On 9/1/20 5:14 AM, almahdi wrote: > How to get last commnda history line number purely & directly on bash script > or prompt ? > > as it's pure & directly viable in PS1 env. var. > PS1=`echo \!` HISTCMD The history number, or index in the history list, of the current command. Assig

Re: How get last commnda history line number directly

2020-09-01 Thread Greg Wooledge
On Tue, Sep 01, 2020 at 02:14:33AM -0700, almahdi wrote: > How to get last commnda history line number purely & directly on bash script > or prompt ? > > as it's pure & directly viable in PS1 env. var. > PS1=`echo \!` > > confusingly bash 'mainstream' itself wasn't found way to do unicorn:~$ x='

How get last commnda history line number directly

2020-09-01 Thread almahdi
How to get last commnda history line number purely & directly on bash script or prompt ? as it's pure & directly viable in PS1 env. var. PS1=`echo \!` confusingly bash 'mainstream' itself wasn't found way to do -- Sent from: http://gnu-bash.2382.n7.nabble.com/