From a06bbf97edcbd886e90f246a6aadbb41f879c0c0 Mon Sep 17 00:00:00 2001 From: ianmacd <> Date: Thu, 24 Jan 2002 04:03:26 +0000 Subject: [PATCH] release updated to 20020124 call _expand() from some of the completion routines() find now performs default completion, rather than dirnames, if nothing else is returned --- bash_completion | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/bash_completion b/bash_completion index 06729d85..747f1d81 100644 --- a/bash_completion +++ b/bash_completion @@ -2,7 +2,7 @@ # # # @@ -20,7 +20,7 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -# RELEASE: 20020121 +# RELEASE: 20020124 [ -n "$DEBUG" ] && set -v || set +v # Set a couple of useful vars @@ -115,8 +115,7 @@ have() } -# GNU chown(1) completion. This should be expanded to allow the use of -# ':' as well as '.' as the user.group separator. +# GNU chown(1) completion. # _chown() { @@ -162,6 +161,7 @@ _chgrp() # first parameter on line or first since an option? if [ $COMP_CWORD = 1 ] || [[ "$prev" == -* ]]; then + _expand || return 0 COMPREPLY=( $( compgen -g $cur ) ) fi @@ -285,6 +285,8 @@ _man() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} + _expand || return 0 + # default completion if parameter contains / [[ "$cur" == */* ]] && return 0 # default to command completion if no man.config @@ -423,6 +425,8 @@ _find() ;; esac + _expand || return 0 + # complete using basic options ($cur has had its dash removed here, # as otherwise compgen will bomb out with an error, since it thinks # the dash is an option to itself) @@ -454,10 +458,9 @@ _find() COMPREPLY[i]=-${COMPREPLY[i]} done - return 0 } -complete -F _find -o dirnames find +complete -F _find -o default find # Linux ifconfig(8) completion # @@ -1094,6 +1097,8 @@ _scp() COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} + _expand || return 0 + _known_hosts COMPREPLY=( ${COMPREPLY[@]} $( compgen -f $cur ) )