[Bash-completion-commits] [SCM] bash-completion branch, master, updated. f24dbe8dd45cba63c6acf89fa8a300b1eae56567

David Paleino dapal at debian.org
Mon Mar 8 11:42:23 UTC 2010


The following commit has been merged in the master branch:
commit 8755f716fc98fb762f472d7b71873cea1eb88423
Merge: 2491104bac1e7ed1d0c58924d6c00bc3c94d5618 fca102412ed017631ffb5e6085bd6f9d9bc0d112
Author: David Paleino <dapal at debian.org>
Date:   Mon Mar 8 12:38:33 2010 +0100

    Merge branch 'master' of git+ssh://git.debian.org/git/bash-completion/bash-completion

diff --combined bash_completion
index 9e26316,ea7bc95..6c86a11
--- a/bash_completion
+++ b/bash_completion
@@@ -1,5 -1,5 +1,5 @@@
  #
- #   bash_completion - programmable completion functions for bash 3.x
+ #   bash_completion - programmable completion functions for bash 3.2+
  #
  #   Copyright © 2006-2008, Ian Macdonald <ian at caliban.org>
  #             © 2009-2010, Bash Completion Maintainers
@@@ -121,6 -121,7 +121,7 @@@ complete -f -X '!*.po' poedit gtranslat
  complete -f -X '!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])' harbour gharbour hbpp
  complete -f -X '!*.[Hh][Rr][Bb]' hbrun
  complete -f -X '!*.ly' lilypond ly2dvi
+ complete -f -X '!*.@(dif?(f)|?(d)patch)' cdiff kompare
  # FINISH exclude -- do not remove this line
  
  # start of section containing compspecs that can be handled within bash
@@@ -588,7 -589,7 +589,7 @@@ _filedir(
      #
      if [[ "$1" != -d ]]; then
          xspec=${1:+"!*.$1"}
 -        if [[ ${cur:0:1} == "'" && ${BASH_VERSINFO[0]} -ge 4 ]]; then
 +        if [[ ${BASH_VERSINFO[0]} -ge 4 ]]; then
              toks=( ${toks[@]-} $(
                  eval compgen -f -X \"\$xspec\" -- $quoted
              ) )
@@@ -622,11 -623,11 +623,11 @@@
                      if [[ ${cur:0:1} != "'" ]]; then
                          [[ -d ${toks[i]} ]] && toks[i]="${toks[i]}"/
                          if [[ ${cur:0:1} == '"' ]]; then
 -                            toks[i]=${toks[i]//\\/\\\\}       
 +                            toks[i]=${toks[i]//\\/\\\\}
                              toks[i]=${toks[i]//\"/\\\"}
                              toks[i]=${toks[i]//\$/\\\$}
                          else
 -                            toks[i]=$(printf %q ${toks[i]})       
 +                            toks[i]=$(printf %q ${toks[i]})
                          fi
                      fi
                  done
@@@ -1084,9 -1085,13 +1085,13 @@@ _chown(
  
      if [[ "$cur" == -* ]]; then
          # Complete -options
+         local w opts
+         for w in "${COMP_WORDS[@]}" ; do
+             [[ "$w" == -@(R|-recursive) ]] && opts="-H -L -P" && break
+         done
          COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes --dereference \
              --no-dereference --from --silent --quiet --reference --recursive \
-             --verbose --help --version' -- "$cur" ) )
+             --verbose --help --version $opts' -- "$cur" ) )
      else
          local args
  
@@@ -1125,9 -1130,13 +1130,13 @@@ _chgrp(
  
      # options completion
      if [[ "$cur" == -* ]]; then
+         local w opts
+         for w in "${COMP_WORDS[@]}" ; do
+             [[ "$w" == -@(R|-recursive) ]] && opts="-H -L -P" && break
+         done
          COMPREPLY=( $( compgen -W '-c -h -f -R -v --changes --dereference \
              --no-dereference --silent --quiet --reference --recursive \
-             --verbose --help --version' -- "$cur" ) )
+             --verbose --help --version $opts' -- "$cur" ) )
          return 0
      fi
  
@@@ -1810,7 -1819,7 +1819,7 @@@ _filedir_xspec(
  
      # get first exclusion compspec that matches this command
      xspec=$( awk "/^complete[ \t]+.*[ \t]${1##*/}([ \t]|\$)/ { print \$0; exit }" \
-         $BASH_COMPLETION )
+         "$BASH_COMPLETION" )
      # prune to leave nothing but the -X spec
      xspec=${xspec#*-X }
      xspec=${xspec%% *}
@@@ -1837,7 -1846,7 +1846,7 @@@
  
      COMPREPLY=( "${toks[@]}" )
  }
- list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' $BASH_COMPLETION | \
+ list=( $( sed -ne '/^# START exclude/,/^# FINISH exclude/p' "$BASH_COMPLETION" | \
      # read exclusion compspecs
      (
      while read line
@@@ -1863,19 -1872,19 +1872,19 @@@ unset lis
  # source completion directory definitions
  if [[ -d $BASH_COMPLETION_COMPAT_DIR && -r $BASH_COMPLETION_COMPAT_DIR && \
      -x $BASH_COMPLETION_COMPAT_DIR ]]; then
-     for i in $(LC_ALL=C command ls $BASH_COMPLETION_COMPAT_DIR); do
+     for i in $(LC_ALL=C command ls "$BASH_COMPLETION_COMPAT_DIR"); do
          i=$BASH_COMPLETION_COMPAT_DIR/$i
          [[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|*.rpm@(orig|new|save)) \
-             && ( -f $i || -h $i ) && -r $i ]] && . $i
+             && ( -f $i || -h $i ) && -r $i ]] && . "$i"
      done
  fi
  if [[ $BASH_COMPLETION_DIR != $BASH_COMPLETION_COMPAT_DIR && \
      -d $BASH_COMPLETION_DIR && -r $BASH_COMPLETION_DIR && \
      -x $BASH_COMPLETION_DIR ]]; then
-     for i in $(LC_ALL=C command ls $BASH_COMPLETION_DIR); do
+     for i in $(LC_ALL=C command ls "$BASH_COMPLETION_DIR"); do
          i=$BASH_COMPLETION_DIR/$i
          [[ ${i##*/} != @(*~|*.bak|*.swp|\#*\#|*.dpkg*|*.rpm@(orig|new|save)) \
-             && ( -f $i || -h $i ) && -r $i ]] && . $i
+             && ( -f $i || -h $i ) && -r $i ]] && . "$i"
      done
  fi
  unset i

-- 
bash-completion



More information about the Bash-completion-commits mailing list