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

Re: completing directory path



On Jul 7,  7:32pm, Bart Schaefer wrote:
}
} On Jul 7,  7:16pm, Peter Stephenson wrote:
} }
} } > On Jul 7,  5:12pm, Peter Stephenson wrote:
} } > }
} } > } completion has stopped working on ~1/... etc.
} } > 
} } > What are your styles?  This works for me.  Well, it sort of works; I first
} } > get ~1/ --> ~+1/ and then completion after ~+1/ works as expected.
} } 
} } I can reproduce it with completely vanilla new completion, but it's weirder
} 
} However, *I'm* now getting some inconsistent behavior, because it's not
} replacing ~1 with ~+1 which it definitely was before.

Ahem.  It helps to have run compinit in order to see the new completion
behavior.

With compinit -D, I get:

zagzig% autoload -U compinit; compinit -D 
zagzig% pushd /tmp
/tmp ~
zagzig% cd ~1/i<TAB>
(feep)

TAB or C-d doesn't matter, I just get feep.

However:

zagzig% cd ~1/<TAB>
zagzig% cd ~+1/

Thereafter, completion works normally:

zagzig% cd ~+1/i<TAB>
zagzig% cd ~+1/images/

So I still can't reproduce what PWS reported (the "command not found" at
line 153 of _main_complete).  So this question stands:

} Does it perhaps have something more to do with the contents of directories
} in the dirstack than just whether there is a unique match for one of the
} files?

However, looking at C-x? output, there appears to be a problem at line 560
of _path_files.  There's a call to compadd like this:

+_path_files:559> compquote tmp4 tmp1
+_path_files:560> compadd -Qf -J -default- -p ~+1/ -W /home/schaefer/ -M r:|/=* r:|=* -a tmp1

Note the `-p ~+1/' -- the actual string from the line is ~1, so that compadd
fails to add anything even though $tmp1 has the correct value ("images").
This has ultimately come from line 214, which sticks the `+' into $linepath.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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