Update of /cvsroot/fink/dists/10.3/unstable/main/finkinfo/shells
In directory
sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5523/10.3/unstable/main/finkinfo/shells
Modified Files:
bash-completion.info bash-completion.patch
Log Message:
incorporate lukas westermann's fink and open patches
Index: bash-completion.patch
===================================================================
RCS file:
/cvsroot/fink/dists/10.3/unstable/main/finkinfo/shells/bash-completion.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bash-completion.patch 13 May 2004 16:37:00 -0000 1.1
+++ bash-completion.patch 13 May 2004 18:07:26 -0000 1.2
@@ -18,7 +18,7 @@
+fi
diff -uNr bash_completion/bash_completion bash_completion-new/bash_completion
--- bash_completion/bash_completion Wed Mar 31 12:45:32 2004
-+++ bash_completion-new/bash_completion Thu May 13 12:29:24 2004
++++ bash_completion-new/bash_completion Thu May 13 13:56:21 2004
@@ -31,14 +31,14 @@
if [ -n "${FUNCNAME:-}" ]; then
# we're being sourced from within a function, so we can't use
@@ -47,6 +47,15 @@
# This function performs file and directory completion. It's better than
# simply using 'compgen -f', because it honours spaces in filenames.
+@@ -275,7 +275,7 @@
+
+ # Linux ifconfig(8) and iwconfig(8) helper function
+ #
+-[ $UNAME = Linux -o $UNAME = FreeBSD ] && { have ifconfig || have iwconfig; } &&
++[ $UNAME = Linux -o $UNAME = FreeBSD -o $UNAME = Darwin ] && { have ifconfig || have
iwconfig; } &&
+ _ifwconfig()
+ {
+ COMPREPLY=()
@@ -446,7 +446,7 @@
# 'service' command and/or the SysV init.d directory, followed by
# that script's available commands
@@ -78,6 +87,42 @@
# chown(1) completion
#
+@@ -774,7 +774,7 @@
+
+ # Linux and FreeBSD killall(1) completion.
+ #
+-[ $UNAME = Linux -o $UNAME = FreeBSD ] &&
++[ $UNAME = Linux -o $UNAME = FreeBSD -o $UNAME = Darwin ] &&
+ _killall()
+ {
+ local cur
+@@ -792,7 +792,7 @@
+
+ return 0
+ }
+-[ $UNAME = Linux -o $UNAME = FreeBSD ] && complete -F _killall killall pkill
++[ $UNAME = Linux -o $UNAME = FreeBSD -o $UNAME = Darwin ] && complete -F _killall
killall pkill
+
+ # GNU find(1) completion. This makes heavy use of ksh style extended
+ # globs and contains Linux specific code for completing the parameter
+@@ -908,7 +908,7 @@
+
+ # Linux ifconfig(8) completion
+ #
+-[ $UNAME = Linux -o $UNAME = FreeBSD ] && have ifconfig &&
++[ $UNAME = Linux -o $UNAME = FreeBSD -o $UNAME = Darwin ] && have ifconfig &&
+ _ifconfig()
+ {
+ local cur
+@@ -920,7 +920,7 @@
+
+ COMPREPLY=( $( compgen -W '[EMAIL PROTECTED]' -- $cur ) )
+ }
+-[ $UNAME = Linux -o $UNAME = FreeBSD ] && have ifconfig &&
++[ $UNAME = Linux -o $UNAME = FreeBSD -o $UNAME = Darwin ] && have ifconfig &&
+ complete -F _ifconfig ifconfig
+
+ # Linux iwconfig(8) completion
@@ -1742,7 +1742,7 @@
if [ -n "$special" ]; then
case $special in
@@ -147,3 +192,255 @@
admindir=/var/lib/dpkg/alternatives
else
admindir=/var/lib/rpm/alternatives
+@@ -5805,6 +5809,7 @@
+ \"${cur#[\`\"\']}\" 2>/dev/null ) \
+ $( compgen -d -- $cur ) )
+ }
++
+ list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' \
+ $BASH_COMPLETION | \
+ # read exclusion compspecs
+diff -uNr bash_completion/fink.sh bash_completion-new/fink.sh
+--- bash_completion/fink.sh Wed Dec 31 19:00:00 1969
++++ bash_completion-new/fink.sh Thu May 13 13:54:24 2004
+@@ -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
++#
++
++[ $UNAME = 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 /sw/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 /sw/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
++}
+\ No newline at end of file
+diff -uNr bash_completion/open.sh bash_completion-new/open.sh
+--- bash_completion/open.sh Wed Dec 31 19:00:00 1969
++++ bash_completion-new/open.sh Thu May 13 13:54:24 2004
+@@ -0,0 +1,106 @@
++#!/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.
++#
++
++#
++# 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
++#
++
++[ $UNAME = 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}" ) )
++ 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
++}
+\ No newline at end of file
Index: bash-completion.info
===================================================================
RCS file: /cvsroot/fink/dists/10.3/unstable/main/finkinfo/shells/bash-completion.info,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- bash-completion.info 13 May 2004 16:37:00 -0000 1.1
+++ bash-completion.info 13 May 2004 18:07:26 -0000 1.2
@@ -1,6 +1,6 @@
Package: bash-completion
Version: 20040331
-Revision: 1
+Revision: 2
Source: http://www.caliban.org/files/bash/%n-%v.tar.gz
Source-MD5: 0adf18ca3a6b57e1a681f80a05f8ff06
SourceDirectory: bash_completion
@@ -12,6 +12,7 @@
install -d -m 755 %i/etc/profile.d
install -m 755 bash_completion %i/etc/
install -m 755 bash-completion.sh %i/etc/profile.d/
+ install -m 755 fink.sh open.sh contrib/* %i/etc/bash_completion.d/
<<
DocFiles: BUGS COPYING Changelog README
Description: Command-line completions for bash
-------------------------------------------------------
This SF.Net email is sponsored by: SourceForge.net Broadband
Sign-up now for SourceForge Broadband and get the fastest
6.0/768 connection for only $19.95/mo for the first 3 months!
http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click
_______________________________________________
Fink-commits mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-commits