Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Feb 2001 00:39:34 +0000 (UTC)
From:      naddy@mips.inka.de (Christian Weisgerber)
To:        freebsd-ports@freebsd.org
Subject:   Re: useful bash completion function for pkg commands
Message-ID:  <95ab86$2n6j$1@kemoauc.mips.inka.de>
References:  <20010131125356.G52003@gelatinous.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Aaron Smith <aaron@mutex.org> wrote:

> hi all. i just wanted to share this bash completion function i wrote that
> completes package names for pkg_info and pkg_delete. [...]

Hmm.  I don't see much use in dealing with the flags.

_pkg_func()
{
    COMPREPLY=( $(compgen -d /var/db/pkg/$2) )
    COMPREPLY=${COMPREPLY[@]#/var/db/pkg/}
}
complete -F _pkg_func pkg_delete pkg_info

-- 
Christian "naddy" Weisgerber                          naddy@mips.inka.de



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?95ab86$2n6j$1>