On 2/25/2011 4:40 PM, David Morano wrote:
> Hello All,
>
> I just installed the recent KSH release and I am noticing that the
> EMACS-mode command line editing seems to be acting funny (weird):
>
> $ print -- $(.sh.version}
> Version JMP 93u 2011-02-08
> $ uname -a
> SunOS rca 5.8 Generic_117350-33 sun4u sparc SUNW,Ultra-2 SunOS
> $
>
> If I enter a command line successfully, it gets put into the history
> as expected. However if I recall that same line with ^P and then
> put a pound character ('#') at the front of it commenting it out
> and then entering it again, problems occur on when recalling that comment
> line and editing it again.
>
> For example:
>
> $ print -- hello world
> hello world
> $ <-- recall line w/ ^P
> $ print -- hello world <-- edit and put '#' in front
> $ #print -- hello world <-- enter it
> $ <-- recall edited line
> $ #print -- hello world <-- cursor is at the end
>
> Now I type some ^B characters it appears to delete the characters from
> the end of the line -- rather than moving backwards over the characters
> as it used to do in the past. I also get what appear to be an array of
> random behaviors that appear to be attempting to perform some sort of
> command completion. Is all of this some sort of new functional behavior?
>
> What is this weirdo behavior or mode all about?
>
> Also one is barely able to escape from this mess by typing repeated delete
> characters (deleting all characters on the line back to the beginning).
>
> Is there any way to get the previous behavior, where one can just
> edit a previous line that has been commented out?
>
> Thanks for any feedback or information on this.
In the RELEASE file, it tells you about SHOPT_EDPREDICT, added 10-05-20,
which affects any line that starts with a '#', not just a line being
recalled from history.
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.
I get the same behaviour as you, which certainly seems like a bug - you
are not typing a line that begins with #.
In the mean time, either comment your lines with space hash (" #") or
recompile with SHOPT_EDPREDICT=0
Icarus
_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users