Hello users, I am looking for some feedback from *BSD users/admins who find themselves using zsh's _bsd_pkg completion for pkg_add, pkg_create, pkg_delete and pkg_info. I am working with OpenBSD but would really appreciate some feedback from someone using _bsd_pkg under FreeBSD. Arising from some light discussion on -workers, I have attached a revised version of _bsd_pkg which takes into account OpenBSD specifics. However, I have some queries about this file as well as looking for people who can confirm its behaviour under FreeBSD and NetBSD. Part I: _bsd_pkg_pkgfiles(), _bsd_pkg_makepaths(), pkg_add() Includes a patch for _bsd_pkg_pkgfiles(), which was matching paths against an undefined variable $PKG_PATH. Is this defined under FreeBSD, perhaps? I found the completion worked erroneously under OpenBSD. My attached version fixes that, and also allows this sort of completion: % ls /usr/ports/packages/blah/ All databases % ls /usr/ports/packages/blah/All foo.tgz bar.tgz % ls /usr/ports/packages/blah/databases db1.tgz db2.tgz % pwd /my/home/directory % ls -dF * */* dir1/ dir1/file3.tgz dir2/ file1.tgz file2.txt % pkg_add file1.tgz foo.tgz bar.tgz % pkg_add dir1/file3.tgz % pkg_add databases/ db1.tgz db2.tgz % pkg_add foo pkg_add /usr/ports/packages/blah/All/foo.tgz % pkg_add -v foo.tgz pkg_add -v /usr/ports/packages/blah/All/foo.tgz The previous behaviour (for me) was: % pkg_add /usr/ports/packages/blah/All/foo.tgz /usr/ports/packages/blah/All/bar.tgz file1.tgz dir1 dir2 /bin /dev /etc I like the "new" behaviour. Basically, the selection list is much more readable and can understand packages subdirectories (to help jog one's memory). So far, the latter is in a 'case' construct for OpenBSD since I don't know how other BSDs lay out their /usr/ports/packages/*. Now this is getting bloat-like, but the previous behaviour seems to leave plenty of room to squeeze out some day-to-date value. The patch I post to zsh-workers won't include all of this for now, but I am interested in users' opinions. Maybe you would like a function that you could bind to a keystroke to bring up package lists. Part II: Flags for pkg_info Under OpenBSD, the -a option can only be used on its own (no other flags or arguments are appropriate). I have implemented this inside a 'case' for openbsd*. If the other BSDs are the same, then we can reduce some of the 'case' constructs. Part III: Other patches Other differences between HEAD and my attachment are (copied from a patch file that I will pass on to -workers): # Replaced single quotes with double quotes # (for readability/neatness when there are nested quote marks). # Detabbed. # OpenBSD compatability for pkg_delete, pkg_info, pkg_create options. # _bsd_pkg_pkgs allows symlinks to directories, not just directories # (rarely useful, but helped once when I was in a pinch). -- James