cc:  [email protected]
Subject: Re: [ast-users] Possible ksh 93 u issue ?
--------

> Hello,
> 
> We have noticed the following behavior within ksh 93 u and curious to know if 
> po
> ssible bug or hidden feature.
> 
> Using  Version JM 93u 2011-02-08 on Red Hat Enterprise Linux AS release 4 
> (Nahan
> t Update 8)
> 
> $ echo ${.sh.version}
> Version JM 93u 2011-02-08
> 
> With the following environment variables set
> 
> HISTFILE=/home/wtkeeler/.hist_palltc07
> HISTSIZE=1000
> EDITOR=vi
> FCEDIT=vi
> 
> If you are sitting at the ksh prompt and type # and space bar one gets a 
> random 
> command line listing from the $HISTFILE
> 
> $ #
>  1)   id
> 2)    win naftcltc12
> 3)    win naftcltc11
> 4)    win naftcltc10
> 5)    win naftcltc01
> 6)  cd /etc
> 7)  -lt
> 
> Ksh appears to do a seek into the history file and output a menu of command 
> hist
> ory.  Below is the strace
> 
> 
> 
> Note the user is maintaining a unique $HISTFILE per login machine.  User 
> .profil
> e has
> 
> 
> 
> HISTFILE="$HOME/.hist_$(uname -n)"
> 
> export HOSTFILE
> 
> 
> 
> 
> 
> Open file descriptor 3 in the above strace is the $HISTFILE.
> 
> 
> /proc/26441> ls -l fd
> total 4
> lrwx------  1 wtkeeler wtkeeler 64 Jun 27 10:31 0 -> /dev/pts/610
> lrwx------  1 wtkeeler wtkeeler 64 Jun 27 10:31 1 -> /dev/pts/610
> lrwx------  1 wtkeeler wtkeeler 64 Jun 27 10:27 2 -> /dev/pts/610
> lrwx------  1 wtkeeler wtkeeler 64 Jun 27 10:31 3 -> 
> /home/wtkeeler/.hist_palltc
> 07
> 
> Let us know if you need any more information in trying to replicate or 
> diagnose 
> the issue.
> 
> Thank You
> 
> Michael
> 
> Michael Nemeth
> Global Engineering Systems
> [cid:[email protected]]
> *[email protected]
> 
> 

That was due to a compile option SHOPT_EDPREDICT that was added 2010-05-20.
Here is a description from the RELEASE file:
10-05-20 +The compile option SHOPT_EDPREDICT has been added.  When this option
          is on, as you type a line beginning with a # the following characters
          are treated as a shell pattern and cause matching lines from the
          history file to be displayed as a numbered list as you type.
          You can scroll up and down this list or you can use <ESC>nTAB
          to make this the current line (n defaults to 1 of ommitted) or
          <ESC>n<cr> to execute.

If you are just typing comments, you should be able to ignore the predictions
that show up on the screen.

David Korn
[email protected]
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to