Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 417923 | Differences between
and this patch

Collapse All | Expand All

(-)libreoffice-core-3.6.4.3/bin/bash-completion.in (-29 / +5 lines)
Lines 23-40 Link Here
23
    # -d, -f, and -X pattern without missing directories.
23
    # -d, -f, and -X pattern without missing directories.
24
    local c=${COMP_WORDS[COMP_CWORD]}
24
    local c=${COMP_WORDS[COMP_CWORD]}
25
    local a="${COMP_LINE}"
25
    local a="${COMP_LINE}"
26
    local e s g=0 cd dc t=""
26
    local e s cd dc t=""
27
    local IFS
27
    local IFS
28
28
29
    shopt -q extglob && g=1
30
    test $g -eq 0 && shopt -s extglob
31
    # Don't be fooled by the bash parser if extglob is off by default
32
    cd='*-?(c)d*'
29
    cd='*-?(c)d*'
33
    dc='*-d?(c)*'
30
    dc='*-d?(c)*'
34
31
35
    case "${1##*/}" in
32
    case "${1##*/}" in
36
@BASH_COMPLETION_SUFFIXES_CHECKS@
33
@BASH_COMPLETION_SUFFIXES_CHECKS@
37
    *)			e='!*'
34
    *)			e='@()'
38
    esac
35
    esac
39
36
40
    case "$(complete -p ${1##*/} 2> /dev/null)" in
37
    case "$(complete -p ${1##*/} 2> /dev/null)" in
Lines 52-86 Link Here
52
    \$\{*\})	   eval COMPREPLY=\(${c}\) ;;
49
    \$\{*\})	   eval COMPREPLY=\(${c}\) ;;
53
    \$\{*)		COMPREPLY=($(compgen -v -P '${' -S '}'  -- ${c#??}))	;;
50
    \$\{*)		COMPREPLY=($(compgen -v -P '${' -S '}'  -- ${c#??}))	;;
54
    \$*)		COMPREPLY=($(compgen -v -P '$'          -- ${c#?}))	;;
51
    \$*)		COMPREPLY=($(compgen -v -P '$'          -- ${c#?}))	;;
55
    \~*/*)		COMPREPLY=($(compgen -f -X "$e"         -- ${c}))	;;
52
    \~*)		cur="${COMP_WORDS[COMP_CWORD]}"; _filedir "$e"	;;
56
    \~*)		COMPREPLY=($(compgen -u ${s}	 	-- ${c}))	;;
57
    *@*)		COMPREPLY=($(compgen -A hostname -P '@' -S ':' -- ${c#*@})) ;;
53
    *@*)		COMPREPLY=($(compgen -A hostname -P '@' -S ':' -- ${c#*@})) ;;
58
    *[*?[]*)		COMPREPLY=($(compgen -G "${c}"))			;;
54
    *[*?[]*)		COMPREPLY=($(compgen -G "${c}"))			;;
59
    *[?*+\!@]\(*\)*)
55
    *[?*+\!@]\(*\)*)
60
	if test $g -eq 0 ; then
56
			cur="${COMP_WORDS[COMP_CWORD]}"; _filedir "$e"			;;
61
			COMPREPLY=($(compgen -f -X "$e" -- $c))
62
			test $g -eq 0 && shopt -u extglob
63
			return
64
	fi
65
			COMPREPLY=($(compgen -G "${c}"))			;;
66
    *)
57
    *)
67
	if test "$c" = ".." ; then
58
	cur="${COMP_WORDS[COMP_CWORD]}"; _filedir "$e"					;;
68
			COMPREPLY=($(compgen -d -X "$e" -S / ${_nosp} -- $c))
69
	else
70
			for s in $(compgen -f -X "$e" -- $c) ; do
71
			    if test -d $s ; then
72
				COMPREPLY=(${COMPREPLY[@]} $(compgen -f -X "$e" -S / -- $s))
73
			    elif test -z "$t" ; then
74
				COMPREPLY=(${COMPREPLY[@]} $s)
75
			    else
76
				case "$(file -b $s 2> /dev/null)" in
77
				$t) COMPREPLY=(${COMPREPLY[@]} $s)		;;
78
				esac
79
			    fi
80
			done
81
	fi									;;
82
    esac
59
    esac
83
    test $g -eq 0 && shopt -u extglob
84
}
60
}
85
61
86
62
(-)libreoffice-core-3.6.4.3/bin/generate-bash-completion (-1 / +1 lines)
Lines 174-180 Link Here
174
174
175
    ($first_suffix) || die "Error: No suffix defined for $app\n";
175
    ($first_suffix) || die "Error: No suffix defined for $app\n";
176
176
177
    print BCOUTFILE "    $app)\t\te=\'!*.+(" . $first_suffix . "|" . uc($first_suffix);
177
    print BCOUTFILE "    $app)\t\te=\'@(" . $first_suffix . "|" . uc($first_suffix);
178
    foreach my $suffix (@_) {
178
    foreach my $suffix (@_) {
179
	print BCOUTFILE "|" . $suffix;
179
	print BCOUTFILE "|" . $suffix;
180
	print BCOUTFILE "|" . uc($suffix);
180
	print BCOUTFILE "|" . uc($suffix);

Return to bug 417923