On Sun, Nov 22, 2009 at 09:11:14PM -0800, Philip Guenther wrote: > On Sat, Nov 21, 2009 at 9:21 PM, patrick keshishian <sids...@boxsoft.com> > wrote: > > On Sat, Nov 21, 2009 at 09:15:17PM -0800, patrick keshishian wrote: > >> I wonder if included patch is a correct fix for the following > >> "glitch" I'm seeing with ksh in `set -o vi' mode: > >> > >> Demonstration of "glitch": > >> $ touch a.c a.h > >> $ ls a.<TAB><RETURN> > >> ls: a.: No such file or directory > >> $ <TAB> > >> a.c a.h > >> $ > >> > >> With patch: > >> $ ls a. > > > > And of course I had to screw this up, but I think the point > > was made. > > > > Above should've been: > > > > $ ls a.<TAB><RETURN> > >> ls: a.: No such file or directory > >> $ <TAB><BEEP> > > <squint> > > I *think* you're saying that it's continuing to do completion of the > "a." prefix when you hit tab, even after you've hit enter and are > sitting at a fresh prompt. Is that the behavior you're trying to > report? If so, I'm unable to reproduce that on -current, i386, > neither at the console, in an xterm, in screen in an xterm, nor in > tmux in an xterm. Could you confirm the problem behavior and describe > where you're experiencing it?
I can reproduce the behaviour. The following experiment may show the behaviour more clearly: -> needed for ksh: $ set -o vi $ set -o vi-tabcomplete -> needed in current dir, two files with identical start: $ touch foo.bar foo.baz -> type some comand + first part of filename: $ ls foo -> press tab to perform stage 1 expansion resulting in: $ ls foo.ba -> press enter to perform command: ls: foo.ba: No such file or directory $ -> press tab again and see the system perform the second stage of the completion of the previous command: foo.bar foo.baz $ further demonstration illustrating a failed reset: -> type comand + first part of filename; $ ls foo -> press tab to perform stage 1 expansion resulting in: $ ls foo.ba -> press tab to perform stage 2 expansion resulting in: foo.bar foo.baz -> press enter to perform command: ls: foo.ba: No such file or directory $ -> press tab again and see the system perform the third stage of the completion of the previous command (reset to initial text before first completion): $ ls foo If I read the patch in the original post correctly that patch resets the completion engine state when a \r or \n is intered into the shell. > Philip Guenther Janjaap van Velthooven -- ________________________________________ / __/ /_ / ______/ /_ __/ __/ /___ / / /_ __/___/_/_ /___ / / __/ /___ / / janj...@stack.nl /___/_/_________/_____/_/_/_/_______/_/_/