Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: potential regression on .. completion on FreeBSD a least



On Nov 19,  4:46pm, Pierre-Emmanuel wrote:
} Subject: Re: potential regression on .. completion on FreeBSD a least
}
} Le Wed, 19 Nov 2008 12:34:31 +0100,
} Baptiste Daroussin <baptiste.daroussin@xxxxxxxxx> a écrit :
} 
} > When I do ..<tab> or cd ..<tab> it doesn't complete with / as it did
} > before (until 4.3.6) or as it does on linux. 
} > cd ..<tab> doesn't complete anything, 
} > ..<tab> complete with : external command, alias executable file or
} > directory.
} > 
} > I can't find where is the bug, so I can't send any patch.
} 
} Same on OpenBSD.
} 
} % .<tab> : completion works
} % ..<tab> : no completion (but no error)
} % ../<tab> : completion works

On linux, I get this:

schaefer<501> cd ..
Completing directory in cdpath
.gimp-2.0/         .gstreamer-0.8/    zsh-3.0.5/         zsh-3.0.8-pre/   
.rhopenoffice1.1/  .emacs.d/          zsh-3.1.6/

(The cursor backs up to be located between the two dots.)

In _path_files, it appears that the change from

      # `clever' filing systems where names pop into existence
      # when referenced.
      if (( ! $#tmp1 )); then

to

      # we only do this once for completion of each path segment.
      if (( ! $#tmp1 && npathcheck == 0 )); then

is causing the existence check

	  if [[ -e "$tmp3${(Q)PREFIX}${(Q)SUFFIX}" ]] then

to be skipped.  Therefore ".." is never added as a possible completion.
It appears we may need another special case.



Messages sorted by: Reverse Date, Date, Thread, Author