This is the mail archive of the
cygwin
mailing list for the Cygwin project.
cygport bash_completion support
- From: Reini Urban <rurban at x-ray dot at>
- To: Cygwin List <cygwin at cygwin dot com>, Ian Macdonald <ian at caliban dot org>
- Date: Sun, 28 May 2006 17:32:24 +0200
- Subject: cygport bash_completion support
Hi Ian, Eric,
Attached is bash_completion support for cygport. (cygwin only)
Put it into /etc/bash_completion.d/cygport
Maybe it can be added to the package, though it's only useful for cygwin.
--
Reini
# -*- sh -*- cygport completion by Reini Urban <rurban@x-ray.at>
#
# $Id: cygport,v 1.1 2006/05/28 17:25:29 rurban Exp $
_cygport()
{
local cur commands
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
commands='download fetch wget get \
prep unpack oldpatch compile build make \
check test inst install list dep depends \
info package pkg diff mkdiff mkpatch finish \
almostall all help version'
if [[ $COMP_CWORD -eq 1 ]] ; then
# first arg: source file completion
_filedir 'cygport'
else
# 2nd++ arg: commands
COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
fi
return 0
}
complete -F _cygport -o default cygport
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/