--- bash-completion-2.1/bash_completion.orig	2014-06-04 12:41:28.000000000 -0400
+++ bash-completion-2.1/bash_completion	2014-06-04 12:47:19.000000000 -0400
@@ -861,7 +861,11 @@
 #
 _configured_interfaces()
 {
-    if [[ -f /etc/debian_version ]]; then
+    if [[ $OSTYPE == *darwin* ]]; then
+	# TODO/FIXME: Update this to new bash_completion code
+	COMPREPLY=( $( compgen -W "$( /sbin/ifconfig | \
+	    grep -E '^[^[:space:]]+:' | cut -d: -f1 )" -- "$cur" ) )
+    elif [[ -f /etc/debian_version ]]; then
         # Debian system
         COMPREPLY=( $( compgen -W "$( sed -ne 's|^iface \([^ ]\{1,\}\).*$|\1|p'\
             /etc/network/interfaces )" -- "$cur" ) )
@@ -1448,7 +1452,7 @@
     if [[ -n $configfile ]]; then
         [[ -r $configfile ]] && config+=( "$configfile" )
     else
-        for i in /etc/ssh/ssh_config ~/.ssh/config ~/.ssh2/config; do
+        for i in @PREFIX@/etc/ssh/ssh_config /etc/ssh/ssh_config ~/.ssh/config ~/.ssh2/config; do
             [[ -r $i ]] && config+=( "$i" )
         done
     fi
@@ -1482,6 +1486,7 @@
     if [[ -z $configfile ]]; then
         # Global and user known_hosts files
         for i in /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 \
+	    @PREFIX@/etc/known_hosts @PREFIX@/etc/known_hosts2 \
             /etc/known_hosts /etc/known_hosts2 ~/.ssh/known_hosts \
             ~/.ssh/known_hosts2; do
             [[ -r $i ]] && kh+=( "$i" )
--- bash-completion-2.1/completions/Makefile.am.orig	2014-06-04 12:48:02.000000000 -0400
+++ bash-completion-2.1/completions/Makefile.am	2014-06-04 13:06:02.000000000 -0400
@@ -62,6 +62,7 @@
 		cvs \
 		cvsps \
 		dd \
+		defaults \
 		desktop-file-validate \
 		dhclient \
 		dict \
@@ -92,6 +93,7 @@
 		filesnarf \
 		find \
 		find_member \
+		fink \
 		freeciv-gtk2 \
 		freeciv-server \
 		function \
@@ -164,6 +166,7 @@
 		koji \
 		ktutil \
 		larch \
+		launchctl \
 		lastlog \
 		ldapsearch \
 		ldapvi \
@@ -233,6 +236,7 @@
 		nmcli \
 		nslookup \
 		ntpdate \
+		open \
 		openssl \
 		opera \
 		p4 \
@@ -377,7 +381,8 @@
 		xz \
 		xzdec \
 		ypmatch \
-		yum-arch
+		yum-arch \
+		xcodebuild
 
 EXTRA_DIST = $(bashcomp_DATA) \
 	     _mock _modules _subversion _udevadm _yum _yum-utils
--- bash-completion-2.1/completions/Makefile.in.orig	2014-06-04 12:49:31.000000000 -0400
+++ bash-completion-2.1/completions/Makefile.in	2014-06-04 12:51:26.000000000 -0400
@@ -233,6 +233,7 @@
 		cvs \
 		cvsps \
 		dd \
+		defaults \
 		desktop-file-validate \
 		dhclient \
 		dict \
@@ -263,6 +264,7 @@
 		filesnarf \
 		find \
 		find_member \
+		fink \
 		freeciv-gtk2 \
 		freeciv-server \
 		function \
@@ -335,6 +337,7 @@
 		koji \
 		ktutil \
 		larch \
+		launchctl \
 		lastlog \
 		ldapsearch \
 		ldapvi \
@@ -404,6 +407,7 @@
 		nmcli \
 		nslookup \
 		ntpdate \
+		open \
 		openssl \
 		opera \
 		p4 \
@@ -548,7 +552,8 @@
 		xz \
 		xzdec \
 		ypmatch \
-		yum-arch
+		yum-arch \
+		xcodebuild
 
 EXTRA_DIST = $(bashcomp_DATA) \
 	     _mock _modules _subversion _udevadm _yum _yum-utils
--- bash-completion-2.1/completions/apt-get.orig	2014-06-04 12:52:15.000000000 -0400
+++ bash-completion-2.1/completions/apt-get	2014-06-04 12:53:05.000000000 -0400
@@ -15,7 +15,7 @@
     if [[ -n $special ]]; then
         case $special in
             remove|autoremove|purge)
-                if [[ -f /etc/debian_version ]]; then
+                if [[ -f /etc/debian_version ] || [ -x "@PREFIX@/bin/fink" ]]; then
                     # Debian system
                     COMPREPLY=( $( \
                         _xfunc dpkg _comp_dpkg_installed_packages $cur ) )
--- bash-completion-2.1/completions/update-alternatives.orig	2014-06-04 13:02:40.000000000 -0400
+++ bash-completion-2.1/completions/update-alternatives	2014-06-04 13:03:35.000000000 -0400
@@ -5,7 +5,7 @@
     local admindir
     # find the admin dir
     for i in alternatives dpkg/alternatives rpm/alternatives; do
-        [[ -d /var/lib/$i ]] && admindir=/var/lib/$i && break
+        [[ -d "@PREFIX@/etc/$i" ]] && admindir="@PREFIX@/etc/$i" && break
     done
     for (( i=1; i < cword; i++ )); do
         if [[ "${words[i]}" == --admindir ]]; then
diff -Nurd bash-completion-1.3/completions/defaults bash-completion-1.3-new/completions/defaults
--- bash-completion-1.3/completions/defaults	1969-12-31 19:00:00.000000000 -0500
+++ bash-completion-1.3-new/completions/defaults	2011-04-28 18:10:45.000000000 -0400
@@ -0,0 +1,175 @@
+# defaults
+# Bash command line completion for defaults
+#
+# Created by Jonathon Mah on 2006-11-08.
+# Copyright 2006 Playhaus. All rights reserved.
+# 
+# This file is licensed under the BSD license, as follows:
+#
+# Copyright (c) 2006, Playhaus
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice, this
+#   list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+#   this list of conditions and the following disclaimer in the documentation
+#   and/or other materials provided with the distribution.
+# * Neither the name of the Playhaus nor the names of its contributors may be
+#   used to endorse or promote products derived from this software without
+#   specific prior written permission.
+#
+# This software is provided by the copyright holders and contributors "as is"
+# and any express or implied warranties, including, but not limited to, the
+# implied warranties of merchantability and fitness for a particular purpose are
+# disclaimed. In no event shall the copyright owner or contributors be liable
+# for any direct, indirect, incidental, special, exemplary, or consequential
+# damages (including, but not limited to, procurement of substitute goods or
+# services; loss of use, data, or profits; or business interruption) however
+# caused and on any theory of liability, whether in contract, strict liability,
+# or tort (including negligence or otherwise) arising in any way out of the use
+# of this software, even if advised of the possibility of such damage.
+#
+# Version 1.0 (2006-11-08)
+
+[[ $OSTYPE == *darwin* ]] && have defaults &&
+{
+_defaults_domains()
+{
+    local cur
+    COMPREPLY=()
+    cur=${COMP_WORDS[COMP_CWORD]}
+
+	local domains=$( defaults domains | sed -e 's/, /:/g' | tr : '\n' | sed -e 's/ /\\ /g' | grep -i "^$cur" )
+	local IFS=$'\n'
+	COMPREPLY=( $domains )
+	if [[ $( echo '-app' | grep "^$cur" ) ]]; then
+		COMPREPLY[${#COMPREPLY[@]}]="-app"
+	fi
+
+    return 0
+}
+
+
+_defaults()
+{
+	local cur prev host_opts cmds cmd domain keys key_index
+    cur=${COMP_WORDS[COMP_CWORD]}
+    prev=${COMP_WORDS[COMP_CWORD-1]}
+
+	host_opts='-currentHost -host'
+	cmds='read read-type write rename delete domains find help'
+
+	if [[ $COMP_CWORD -eq 1 ]]; then
+		COMPREPLY=( $( compgen -W "$host_opts $cmds" -- $cur ) )
+		return 0
+	elif [[ $COMP_CWORD -eq 2 ]]; then
+		if [[ "$prev" == "-currentHost" ]]; then
+			COMPREPLY=( $( compgen -W "$cmds" -- $cur ) )
+			return 0
+		elif [[ "$prev" == "-host" ]]; then
+			return 0
+			_known_hosts -a
+		else
+			_defaults_domains
+			return 0
+		fi
+	elif [[ $COMP_CWORD -eq 3 ]]; then
+		if [[ ${COMP_WORDS[1]} == "-host" ]]; then
+			_defaults_domains
+			return 0
+		fi
+    fi
+
+	# Both a domain and command have been specified
+
+	if [[ ${COMP_WORDS[1]} == @(${cmds// /|}) ]]; then
+		cmd=${COMP_WORDS[1]}
+		domain=${COMP_WORDS[2]}
+		key_index=3
+		if [[ "$domain" == "-app" ]]; then
+			if [[ $COMP_CWORD -eq 3 ]]; then
+				# Completing application name. Can't help here, sorry
+				return 0
+			fi
+			domain="-app ${COMP_WORDS[3]}"
+			key_index=4
+		fi
+	elif [[ ${COMP_WORDS[2]} == "-currentHost" ]] && [[ ${COMP_WORDS[2]} == @(${cmds// /|}) ]]; then
+		cmd=${COMP_WORDS[2]}
+		domain=${COMP_WORDS[3]}
+		key_index=4
+		if [[ "$domain" == "-app" ]]; then
+			if [[ $COMP_CWORD -eq 4 ]]; then
+				# Completing application name. Can't help here, sorry
+				return 0
+			fi
+			domain="-app ${COMP_WORDS[4]}"
+			key_index=5
+		fi
+	elif [[ ${COMP_WORDS[3]} == "-host" ]] && [[ ${COMP_WORDS[3]} == @(${cmds// /|}) ]]; then
+		cmd=${COMP_WORDS[3]}
+		domain=${COMP_WORDS[4]}
+		key_index=5
+		if [[ "$domain" == "-app" ]]; then
+			if [[ $COMP_CWORD -eq 5 ]]; then
+				# Completing application name. Can't help here, sorry
+				return 0
+			fi
+			domain="-app ${COMP_WORDS[5]}"
+			key_index=6
+		fi
+	fi
+
+	keys=$( defaults read $domain 2>/dev/null | sed -n -e '/^    [^}) ]/p' | sed -e 's/^    \([^" ]\{1,\}\) = .*$/\1/g' -e 's/^    "\([^"]\{1,\}\)" = .*$/\1/g' | sed -e 's/ /\\ /g' )
+
+	case $cmd in
+	read|read-type)
+		# Complete key
+		local IFS=$'\n'
+		COMPREPLY=( $( echo "$keys" | grep -i "^${cur//\\/\\\\}" ) )
+		;;
+	write)
+		if [[ $key_index -eq $COMP_CWORD ]]; then
+			# Complete key
+			local IFS=$'\n'
+			COMPREPLY=( $( echo "$keys" | grep -i "^${cur//\\/\\\\}" ) )
+		elif [[ $((key_index+1)) -eq $COMP_CWORD ]]; then
+			# Complete value type
+			# Unfortunately ${COMP_WORDS[key_index]} fails on keys with spaces
+			local value_types='-string -data -integer -float -boolean -date -array -array-add -dict -dict-add'
+			local cur_type=$( defaults read-type $domain ${COMP_WORDS[key_index]} 2>/dev/null | sed -e 's/^Type is \(.*\)/-\1/' -e's/dictionary/dict/' | grep "^$cur" )
+			if [[ $cur_type ]]; then
+				COMPREPLY=( $cur_type )
+			else
+				COMPREPLY=( $( compgen -W "$value_types" -- $cur ) )
+			fi
+		elif [[ $((key_index+2)) -eq $COMP_CWORD ]]; then
+			# Complete value
+			# Unfortunately ${COMP_WORDS[key_index]} fails on keys with spaces
+			COMPREPLY=( $( defaults read $domain ${COMP_WORDS[key_index]} 2>/dev/null | grep -i "^${cur//\\/\\\\}" ) )
+		fi
+		;;
+	rename)
+		if [[ $key_index -eq $COMP_CWORD ]] ||
+		   [[ $((key_index+1)) -eq $COMP_CWORD ]]; then
+			# Complete source and destination keys
+			local IFS=$'\n'
+			COMPREPLY=( $( echo "$keys" | grep -i "^${cur//\\/\\\\}" ) )
+		fi
+		;;
+	delete)
+		if [[ $key_index -eq $COMP_CWORD ]]; then
+			# Complete key
+			local IFS=$'\n'
+			COMPREPLY=( $( echo "$keys" | grep -i "^${cur//\\/\\\\}" ) )
+		fi
+		;;
+	esac
+
+    return 0
+}
+complete -F _defaults -o default defaults
+}
diff -Nurd bash-completion-1.3/completions/fink bash-completion-1.3-new/completions/fink
--- bash-completion-1.3/completions/fink	1969-12-31 19:00:00.000000000 -0500
+++ bash-completion-1.3-new/completions/fink	2011-04-28 18:11:02.000000000 -0400
@@ -0,0 +1,128 @@
+#!/bin/bash
+
+# 
+# Copyright (c) 2004, Lukas Westermann <contact AT openos DOT ch>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without 
+# modification, are permitted provided that the following conditions 
+# are met:
+#   - Redistributions of source code must retain the above copyright 
+#     notice, this list of conditions and the following disclaimer.
+#   - Redistributions in binary form must reproduce the above 
+#     copyright notice, this list of conditions and the following 
+#     disclaimer in the documentation and/or other materials 
+#     provided with the distribution.
+#   - The names of its contributors may not be used to endorse or 
+#     promote products derived from this software without specific 
+#     prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# Completion for Fink command
+#
+# History
+# ---------------------------------
+# Version 1.0.0  - initial release
+# Version 1.0.1 - added test to check fink availability
+# Version 1.0.2 - simplified checks for fink availabiltiy
+# Version 1.0.3 - fixed problems with spaces in completion
+#
+
+[[ $OSTYPE == *darwin* ]] && have fink && {
+_fink_installed() {
+    fink list -i --tab "$*" | cut -f2 2>/dev/null
+}
+
+_fink_all() {
+    apt-cache pkgnames "$*" 2>/dev/null
+}
+
+_fink_trees() {
+    cat @PREFIX@/etc/fink.conf | sed -e '/^Trees/!d; s/^Trees://' 2>/dev/null
+}
+
+_fink()
+{
+	local cur prev special i
+	
+	COMPREPLY=()
+	cur=${COMP_WORDS[COMP_CWORD]}
+	prev=${COMP_WORDS[COMP_CWORD-1]}
+
+	for (( i=0; i < ${#COMP_WORDS}-1; i++ )); do
+		if [[ ${COMP_WORDS[i]} == @(install|update|enable|activate|use|list|remove|disable|deactivate|unuse|delete \
+		                            |purge|apropos|describe|desc|description|info|fetch-missing|fetch \
+		                            |build|rebuild|reinstall|validate|check|scanpackages) ]]; then
+			special=${COMP_WORDS[i]}
+		fi
+	done
+
+	if [ -n "${special}" ]; then
+		case $special in
+		    install|enable|activate|use|apropos|describe|desc|description|info|fetch|build)
+			COMPREPLY=( $( _fink_all $cur ) )
+			;;
+		    remove|disable|deactivate|unuse|delete|purge|update|rebuild|reinstall)
+			COMPREPLY=( $( _fink_installed $cur ) )
+			;;		    
+		    fetch-missing)
+			COMPREPLY=( $( compgen -W '-i --ignore-restrictive' -- $cur ) )
+			;;
+		    validate|check)
+			local IFS=$'\t\n'
+			_filedir '@(deb|info)'
+			#COMPREPLY=( $( compgen -f -- $cur ) )
+			;;
+		    scanpackages)
+			COMPREPLY=( $( compgen -W '$( _fink_trees )' -- $cur ) )
+			;;
+		    list)
+			if [[ "$cur" == -* ]]; then
+			    # TODO: Fix problems with --tree=
+			    #if [[ $cur == --tree=* || $cur == -t=* ]]; then
+				#local pfx las #res
+                                #pfx=$( echo $cur | sed -e 's/^\([^=]*\)=.*$/\1/' )
+				#las=$( echo "$cur" | sed -e 's/^[^=]*=//' )
+				#[[ $las == $cur ]] && las=()
+				#res=$( cat @PREFIX@/etc/fink.conf | sed -e '/^Trees/!d; s/^Trees://' 2>/dev/null )
+                                #COMPREPLY=( $( compgen -W '$( _fink_trees )' -- "${las}" ) )
+			    #else
+				COMPREPLY=( $( compgen -W '-h --help -t --tab -i --installed -o --outdated -u --uptodate -n --notinstalled \
+                                                       -s --section -m --maintainer --tree -w --width' -- $cur ) )
+			    #fi
+			else
+			    COMPREPLY=( $( _fink_all $cur ) )
+			fi
+			;;
+		esac
+
+		return 0
+	fi
+
+	if [[ "$cur" == -* ]]; then
+		COMPREPLY=( $( compgen -W '-h -q -V -v -y --help --quite --version --verbose --yes' -- $cur ) )
+	else
+		COMPREPLY=( $( compgen -W 'install remove purge update selfupdate update-all configure list \
+		                           apropos describe fetch fetch-all fetch-missing index validate scanpackages \
+                                           build rebuild reinstall checksums cleanup' -- $cur ) )
+	fi
+
+	return 0
+}
+complete $filenames -F _fink fink
+}
diff -Nurd bash-completion-1.3/completions/launchctl bash-completion-1.3-new/completions/launchctl
--- bash-completion-1.3/completions/launchctl	1969-12-31 19:00:00.000000000 -0500
+++ bash-completion-1.3-new/completions/launchctl	2011-04-28 18:10:45.000000000 -0400
@@ -0,0 +1,171 @@
+# ex: filetype=sh et sw=4
+#
+# launchctl(1) completion
+#
+[[ $OSTYPE == *darwin* ]] && have launchctl &&
+{
+_launchctl()
+{
+    local cur oslevel
+
+    oslevel=${OSTYPE//darwin/}
+    oslevel=${oslevel%%.*}
+
+    COMPREPLY=()
+    cur=`_get_cword`
+
+    if [[ $COMP_CWORD -eq 1 ]]; then
+        local commands
+
+        commands="load unload start stop list setenv unsetenv \
+            getenv export limit shutdown getrusage log umask help"
+
+        if [[ $oslevel -le 8 ]]; then
+            commands+=" reloadttys stdout stderr"
+        fi
+
+        if [[ $oslevel -ge 9 ]]; then
+            commands+=" submit remove bootstrap singleuser bsexec bslist"
+            if [[ $oslevel -ge 10 ]]; then
+                commands+=" bstree managerpid manageruid managername"
+            fi
+        fi
+        COMPREPLY=( $( compgen -W "$commands" -- $cur ) )
+    else
+        local command
+        command=${COMP_WORDS[1]}
+        prev=${COMP_WORDS[COMP_CWORD-1]}
+
+        case "$command" in
+            load|unload)
+                case $prev in
+                    -S)
+                        COMPREPLY=( $( compgen -W "Aqua LoginWindow Background StandardIO System" -- $cur ) )
+                    ;;
+                    -D)
+                        COMPREPLY=( $( compgen -W "system local network all user" -- $cur ) )
+                    ;;
+                    *)
+                        opts="-w"
+                        if [[ $oslevel -ge 0 ]]; then
+                            opts+=" -S -D"
+                            if [[ $command = load ]]; then
+                                opts+=" -F"
+                            fi
+                        fi
+                        COMPREPLY=( $( compgen -f -W "$opts" -- $cur ) )
+                    ;;
+                esac
+            ;;
+            start|stop|remove|list)
+                local jobs opts
+
+                if [[ $command != list || $oslevel -ge 9 ]]; then
+                    if [[ $oslevel -le 8 ]]; then
+                        jobs="$( launchctl list )"
+                    else
+                        jobs="$( launchctl list | awk 'NR>1 { print $3 }')"
+                        if [[ $oslevel -ge 10 && $command = list ]]; then
+                            opts="-x"
+                        fi
+                    fi
+                fi
+                COMPREPLY=( $( compgen -W "$jobs $opts" -- $cur ) )
+            ;;
+            getenv|setenv|unsetenv)
+                if [[ $COMP_CWORD -eq 2 ]]; then
+                    envvars="$( launchctl export | cut -f1 -d= )"
+                    COMPREPLY=( $( compgen -W "$envvars" -- $cur ) )
+                fi
+            ;;
+            getrusage)
+                if [[ $COMP_CWORD -eq 2 ]]; then
+                    COMPREPLY=( $( compgen -W "self children" -- $cur ) )
+                fi
+            ;;
+            limit)
+                if [[ $COMP_CWORD -eq 2 ]]; then
+                    local limits
+                    limits="$( launchctl limit | awk '{print $1}' )"
+                    COMPREPLY=( $( compgen -W "$limits" -- $cur ) )
+                fi
+            ;;
+            log)
+                if [[ $COMP_CWORD -eq 2 ]]; then
+                    COMPREPLY=( $( compgen -W "level only mask" -- $cur ) )
+                else
+                    local level
+                    levels="debug info notice warning error critical alert emergency"
+                    case ${COMP_WORDS[2]} in
+                        level)
+                            if [[ $COMP_CWORD -eq 3 ]]; then
+                                COMPREPLY=( $( compgen -W "$levels" -- $cur ) )
+                            fi
+                        ;;
+                        mask|only)
+                            COMPREPLY=( $( compgen -W "$levels" -- $cur ) )
+                        ;;
+                    esac
+                fi
+            ;;
+            stdout|stderr)
+                # Darwin 8 only
+                if [[ $oslevel -le 8 ]]; then
+                    _filedir
+                fi
+            ;;
+            submit)
+                local i
+                i=1
+                while [[ $i -lt ${#COMP_WORDS[@]} ]]; do
+                    if [[ "${COMP_WORDS[i-1]}" = "--" ]]; then
+                        _command_offset $i
+                        return 0
+                    fi
+                    i=$((i+1))
+                done
+
+                local submit_opts
+                submit_opts="-l -p -o -e --"
+                case $prev in
+                    -l)
+                    ;;
+                    -p)
+                        _command_offset $COMP_CWORD
+                    ;;
+                    -o|-e)
+                        _filedir
+                    ;;
+                    *)
+                        COMPREPLY=( $( compgen -W "$submit_opts" -- $cur ) )
+                    ;;
+                esac
+
+            ;;
+            bslist)
+                local pids opts
+                pids=$( ps axo pid= )
+                [[ $oslevel -ge 10 ]] && opts="-j"
+                COMPREPLY=( $( compgen -W "$pids $opts" -- $cur ) )
+            ;;
+            bsexec)
+                if [[ $COMP_CWORD -eq 2 ]]; then
+                    local pids
+                    pids=$( ps axo pid= )
+                    COMPREPLY=( $( compgen -W "$pids" -- $cur ) )
+                else
+                    _command_offset 3
+                fi
+            ;;
+            bstree)
+                if [[ $oslevel -ge 10 ]]; then
+                    COMPREPLY=( $( compgen -W "-j" -- $cur ) )
+                fi
+                ;;
+        esac
+    fi
+
+    return 0
+}
+complete -F _launchctl $filenames launchctl
+}
diff -Nurd bash-completion-1.3/completions/open bash-completion-1.3-new/completions/open
--- bash-completion-1.3/completions/open	1969-12-31 19:00:00.000000000 -0500
+++ bash-completion-1.3-new/completions/open	2011-04-28 18:30:08.000000000 -0400
@@ -0,0 +1,104 @@
+# 
+# Copyright (c) 2004, Lukas Westermann <contact AT openos DOT ch>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without 
+# modification, are permitted provided that the following conditions 
+# are met:
+#   - Redistributions of source code must retain the above copyright 
+#     notice, this list of conditions and the following disclaimer.
+#   - Redistributions in binary form must reproduce the above 
+#     copyright notice, this list of conditions and the following 
+#     disclaimer in the documentation and/or other materials 
+#     provided with the distribution.
+#   - The names of its contributors may not be used to endorse or 
+#     promote products derived from this software without specific 
+#     prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 
+# CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 
+# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 
+# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR 
+# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 
+# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+#
+# Bash Auto-Completion for the NextStep command 'open'
+#
+# History
+# ----------------------------------
+# Version 1.0.0 - initial release
+# Version 1.0.1 - added test for availabilty (Darwin only
+#                 and check for open)
+# Version 1.0.2 - fixed problems with IFS for -a and -e
+# Version 1.0.3 - simplified availability check
+# Version 1.0.4 - fixed problem with spaces and completion
+#
+
+[[ $OSTYPE == *darwin* ]] && have open && {
+_list_apps() {
+    local IFS=$'\n'
+    find '/Applications' "${HOME}"'/Applications' '/Developer/Applications' -name "${1}*.app" -maxdepth 2 2>/dev/null
+    #TODO: MS Word and other carbon apps...HOW ???
+}
+
+_open()
+{
+
+    local cur prev IFS=$'\t\n'
+    COMPREPLY=()
+    cur=${COMP_WORDS[COMP_CWORD]}
+    prev=${COMP_WORDS[COMP_CWORD-1]}
+
+    if [[ $prev == -a ]]; then
+        local res ncur
+        ncur=$( echo "$cur" | sed -e 's/\\//g' 2>/dev/null )
+        res=$( _list_apps "${ncur}" | sed -e 's/.*\/\([^\/]*\)\.app/\1/' )
+        COMPREPLY=( $( compgen -W "${res}" -- "${ncur}" | sed -e 's/ /\\ /g' ) )
+    elif [[ $prev == -e ]]; then
+        _filedir '@(txt|doc|rtf|rtfd|pdf|png|jpg|gif)'
+    elif [[ $cur == -* ]]; then
+        local IFS=$' \t\n'
+        COMPREPLY=( $( compgen -W '-a -e' -- "$cur" ) )
+    else
+        local first="${COMP_WORDS[1]}" second="${COMP_WORDS[2]}"
+        if [[ $first == -a ]]; then
+            case "$second" in
+                QuickTime*)
+                    _filedir '@(mp3|mpg|mpeg|avi|m4*|mov|alc)'
+                    ;;
+                iTunes)
+                    _filedir '@(mp3|m4*|ogg|alc)'
+                    ;;
+                Safari|Mozilla|Camino|Opera|Firebird)
+                    # TODO: complete from history/bookmarks ?
+                    _filedir '@(htm|html|xhtm|xhtml|php|php3|php3|xml)'
+                    ;;
+                VLC)
+                    # TODO: complete for CD/DVD too...
+                    _filedir '@(avi|mpg)'
+                    ;;
+                BitTorrent*)
+                    _filedir '@(torrent)'
+                    ;;
+                *)
+                    # others, complete all
+                    _filedir
+                    ;;
+            esac
+        else
+            _filedir
+        fi
+    fi
+
+}
+complete $filenames -F _open open
+}
diff -Nurd bash-completion-1.3/completions/xcodebuild bash-completion-1.3-new/completions/xcodebuild
--- bash-completion-1.3/completions/xcodebuild	1969-12-31 19:00:00.000000000 -0500
+++ bash-completion-1.3-new/completions/xcodebuild	2011-04-28 18:10:45.000000000 -0400
@@ -0,0 +1,91 @@
+# xcodebuild
+# Bash command line completion for xcodebuild
+#
+# Created by Jonathon Mah on 2006-11-08.
+# Copyright 2006 Playhaus. All rights reserved.
+#
+# This file is licensed under the BSD license, as follows:
+#
+# Copyright (c) 2006, Playhaus
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# * Redistributions of source code must retain the above copyright notice, this
+#   list of conditions and the following disclaimer.
+# * Redistributions in binary form must reproduce the above copyright notice,
+#   this list of conditions and the following disclaimer in the documentation
+#   and/or other materials provided with the distribution.
+# * Neither the name of the Playhaus nor the names of its contributors may be
+#   used to endorse or promote products derived from this software without
+#   specific prior written permission.
+#
+# This software is provided by the copyright holders and contributors "as is"
+# and any express or implied warranties, including, but not limited to, the
+# implied warranties of merchantability and fitness for a particular purpose are
+# disclaimed. In no event shall the copyright owner or contributors be liable
+# for any direct, indirect, incidental, special, exemplary, or consequential
+# damages (including, but not limited to, procurement of substitute goods or
+# services; loss of use, data, or profits; or business interruption) however
+# caused and on any theory of liability, whether in contract, strict liability,
+# or tort (including negligence or otherwise) arising in any way out of the use
+# of this software, even if advised of the possibility of such damage.
+#
+# Version 1.0 (2006-11-08)
+
+[[ $OSTYPE == *darwin* ]] && have xcodebuild &&
+{
+_xcodebuild()
+{
+	local cur prev #cmds cmdOpts optsParam opt helpCmds optBase i
+
+	COMPREPLY=()
+	cur=${COMP_WORDS[COMP_CWORD]}
+	prev=${COMP_WORDS[COMP_CWORD-1]}
+
+	cmds='-project -activetarget -alltargets -target -activeconfiguration -configuration -version -list -help build installsrc install clean'
+
+	if [[ "$prev" = "-project" ]]; then
+		# Show list of projects
+		local projects=$( compgen -X "${1:+"!*.xcodeproj"}" -d | sed -e 's/ /\\ /g' )
+		local IFS=$'\n'
+		COMPREPLY=( $( echo "$projects" | grep "^$cur" ) )
+	elif [[ "$prev" = "-target" ]]; then
+		local arg project_args is_project_next
+		is_project_next="false"
+		for arg in ${COMP_WORDS} ; do
+			if [[ "$is_project_next" = "true" ]]; then
+				project_args="-project $arg"
+				break
+			elif [[ "$arg" = "-project" ]]; then
+				is_project_next="true"
+			fi
+		done
+		cur=$(printf '%q' "$cur" )
+		local targets=$(xcodebuild $project_args -list | sed -n -e '/^    Targets:$/,/^$/p' | sed -e '1d' -e '$d' -e 's/^[[:space:]]*//' -e 's/ (Active)$//' -e 's/ /\\ /g' | grep "^$cur" )
+		local IFS=$'\n'
+		COMPREPLY=( $targets )
+	elif [[ "$prev" = "-configuration" ]]; then
+		local arg project_args is_project_next
+		is_project_next="false"
+		for arg in ${COMP_WORDS} ; do
+			if [[ "$is_project_next" = "true" ]]; then
+				project_args="-project $arg"
+				break
+			elif [[ "$arg" = "-project" ]]; then
+				is_project_next="true"
+			fi
+		done
+		cur=$(printf '%q' "$cur" )
+		local configurations=$(xcodebuild $project_args -list | sed -n -e '/^    Build Configurations:$/,/^$/p' | sed -e '1d' -e '$d' -e 's/^[[:space:]]*//' -e 's/ (Active)$//' -e 's/ /\\ /g' | grep "^$cur" )
+		local IFS=$'\n'
+		COMPREPLY=( $configurations )
+	else
+		COMPREPLY=( $( compgen -W "$cmds" -- $cur ) )
+	fi
+
+	return 0
+}
+complete -F _xcodebuild xcodebuild
+}
