_*: Install our deprecated completions too, try loading them secondarily
parent
e4b17402bb
commit
e201d1be7e
|
@ -1944,12 +1944,14 @@ complete -F _minimal ''
|
|||
# set up dynamic completion loading
|
||||
_completion_loader()
|
||||
{
|
||||
local compfile=./completions
|
||||
[[ $BASH_SOURCE == */* ]] && compfile="${BASH_SOURCE%/*}/completions"
|
||||
compfile+="/${1##*/}"
|
||||
local compdir=./completions compfile
|
||||
[[ $BASH_SOURCE == */* ]] && compdir="${BASH_SOURCE%/*}/completions"
|
||||
|
||||
# Avoid trying to source dirs; https://bugzilla.redhat.com/903540
|
||||
[[ -f "$compfile" ]] && . "$compfile" &>/dev/null && return 124
|
||||
for compfile in "${1##*/}" _"${1##*/}"; do
|
||||
compfile="$compdir/$compfile"
|
||||
# Avoid trying to source dirs; https://bugzilla.redhat.com/903540
|
||||
[[ -f "$compfile" ]] && . "$compfile" &>/dev/null && return 124
|
||||
done
|
||||
|
||||
# Need to define *something*, otherwise there will be no completion at all.
|
||||
complete -F _minimal "$1" && return 124
|
||||
|
|
|
@ -130,6 +130,7 @@ bashcomp_DATA = 2to3 \
|
|||
hping2 \
|
||||
htop \
|
||||
htpasswd \
|
||||
_hwclock \
|
||||
iconv \
|
||||
id \
|
||||
idn \
|
||||
|
@ -141,6 +142,7 @@ bashcomp_DATA = 2to3 \
|
|||
installpkg \
|
||||
interdiff \
|
||||
invoke-rc.d \
|
||||
_ionice \
|
||||
ip \
|
||||
iperf \
|
||||
ipmitool \
|
||||
|
@ -210,8 +212,10 @@ bashcomp_DATA = 2to3 \
|
|||
mkinitrd \
|
||||
mktemp \
|
||||
mmsitepass \
|
||||
_mock \
|
||||
modinfo \
|
||||
modprobe \
|
||||
_modules \
|
||||
monodevelop \
|
||||
mount \
|
||||
mount.linux \
|
||||
|
@ -234,6 +238,7 @@ bashcomp_DATA = 2to3 \
|
|||
newusers \
|
||||
ngrep \
|
||||
nmap \
|
||||
_nmcli \
|
||||
nslookup \
|
||||
ntpdate \
|
||||
openssl \
|
||||
|
@ -289,6 +294,7 @@ bashcomp_DATA = 2to3 \
|
|||
remove_members \
|
||||
removepkg \
|
||||
renice \
|
||||
_repomanage \
|
||||
reportbug \
|
||||
reptyr \
|
||||
resolvconf \
|
||||
|
@ -303,6 +309,7 @@ bashcomp_DATA = 2to3 \
|
|||
rpmcheck \
|
||||
rrdtool \
|
||||
rsync \
|
||||
_rtcwake \
|
||||
sbcl \
|
||||
sbopkg \
|
||||
screen \
|
||||
|
@ -329,6 +336,9 @@ bashcomp_DATA = 2to3 \
|
|||
sudo \
|
||||
svcadm \
|
||||
svk \
|
||||
_svn \
|
||||
_svnadmin \
|
||||
_svnlook \
|
||||
sync_members \
|
||||
sysbench \
|
||||
sysctl \
|
||||
|
@ -340,6 +350,7 @@ bashcomp_DATA = 2to3 \
|
|||
tracepath \
|
||||
tshark \
|
||||
tune2fs \
|
||||
_udevadm \
|
||||
umount \
|
||||
umount.linux \
|
||||
unace \
|
||||
|
@ -383,20 +394,11 @@ bashcomp_DATA = 2to3 \
|
|||
xz \
|
||||
xzdec \
|
||||
ypmatch \
|
||||
_yum \
|
||||
yum-arch \
|
||||
zopfli
|
||||
|
||||
EXTRA_DIST = $(bashcomp_DATA) \
|
||||
_hwclock \
|
||||
_ionice \
|
||||
_mock \
|
||||
_modules \
|
||||
_nmcli \
|
||||
_rtcwake \
|
||||
_subversion \
|
||||
_udevadm \
|
||||
_yum \
|
||||
_yum-utils
|
||||
EXTRA_DIST = $(bashcomp_DATA)
|
||||
|
||||
CLEANFILES = \
|
||||
7za \
|
||||
|
|
|
@ -210,135 +210,4 @@ _svn()
|
|||
} &&
|
||||
complete -F _svn svn
|
||||
|
||||
_svnadmin()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
local commands
|
||||
commands='create deltify dump help ? hotcopy list-dblogs list-unused-dblogs
|
||||
load lslocks lstxns recover rmlocks rmtxns setlog verify'
|
||||
|
||||
if [[ $cword -eq 1 ]] ; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '--version' -- "$cur" ) )
|
||||
else
|
||||
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
||||
fi
|
||||
else
|
||||
case $prev in
|
||||
--config-dir)
|
||||
_filedir -d
|
||||
return 0
|
||||
;;
|
||||
--fs-type)
|
||||
COMPREPLY=( $( compgen -W 'fsfs bdb' -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
local command=${words[1]}
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
# possible options for the command
|
||||
local options
|
||||
case $command in
|
||||
create)
|
||||
options='--bdb-txn-nosync --bdb-log-keep --config-dir
|
||||
--fs-type'
|
||||
;;
|
||||
deltify)
|
||||
options='--revision --quiet'
|
||||
;;
|
||||
dump)
|
||||
options='--revision --incremental --quiet --deltas'
|
||||
;;
|
||||
hotcopy)
|
||||
options='--clean-logs'
|
||||
;;
|
||||
load)
|
||||
options='--ignore-uuid --force-uuid --parent-dir --quiet
|
||||
--use-pre-commit-hook --use-post-commit-hook'
|
||||
;;
|
||||
rmtxns)
|
||||
options='--quiet'
|
||||
;;
|
||||
setlog)
|
||||
options='--revision --bypass-hooks'
|
||||
;;
|
||||
esac
|
||||
|
||||
options+=" --help"
|
||||
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
||||
else
|
||||
if [[ "$command" == @(help|[h?]) ]]; then
|
||||
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
||||
else
|
||||
_filedir
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _svnadmin -o default svnadmin
|
||||
|
||||
_svnlook()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
local commands
|
||||
commands='author cat changed date diff dirs-changed help ? h history info
|
||||
lock log propget pget pg proplist plist pl tree uuid youngest'
|
||||
|
||||
if [[ $cword -eq 1 ]] ; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '--version' -- "$cur" ) )
|
||||
else
|
||||
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
||||
fi
|
||||
else
|
||||
local command=${words[1]}
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
# possible options for the command
|
||||
local options
|
||||
case $command in
|
||||
author|cat|date|dirs-changed|info|log)
|
||||
options='--revision --transaction'
|
||||
;;
|
||||
changed)
|
||||
options='--revision --transaction --copy-info'
|
||||
;;
|
||||
diff)
|
||||
options='--revision --transaction --no-diff-deleted
|
||||
--no-diff-added --diff-copy-from'
|
||||
;;
|
||||
history)
|
||||
options='--revision --show-ids'
|
||||
;;
|
||||
propget|proplist)
|
||||
options='--revision --transaction --revprop'
|
||||
;;
|
||||
tree)
|
||||
options='--revision --transaction --show-ids --full-paths'
|
||||
;;
|
||||
esac
|
||||
|
||||
options+=" --help"
|
||||
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
||||
else
|
||||
if [[ "$command" == @(help|[h?]) ]]; then
|
||||
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
||||
else
|
||||
_filedir
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _svnlook -o default svnlook
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
|
@ -0,0 +1,79 @@
|
|||
# svnadmin completion -*- shell-script -*-
|
||||
|
||||
# Use of this file is deprecated. Upstream completion is available in
|
||||
# subversion >= 0.12.0, use that instead.
|
||||
|
||||
_svnadmin()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
local commands
|
||||
commands='create deltify dump help ? hotcopy list-dblogs list-unused-dblogs
|
||||
load lslocks lstxns recover rmlocks rmtxns setlog verify'
|
||||
|
||||
if [[ $cword -eq 1 ]] ; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '--version' -- "$cur" ) )
|
||||
else
|
||||
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
||||
fi
|
||||
else
|
||||
case $prev in
|
||||
--config-dir)
|
||||
_filedir -d
|
||||
return 0
|
||||
;;
|
||||
--fs-type)
|
||||
COMPREPLY=( $( compgen -W 'fsfs bdb' -- "$cur" ) )
|
||||
return 0
|
||||
;;
|
||||
esac
|
||||
|
||||
local command=${words[1]}
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
# possible options for the command
|
||||
local options
|
||||
case $command in
|
||||
create)
|
||||
options='--bdb-txn-nosync --bdb-log-keep --config-dir
|
||||
--fs-type'
|
||||
;;
|
||||
deltify)
|
||||
options='--revision --quiet'
|
||||
;;
|
||||
dump)
|
||||
options='--revision --incremental --quiet --deltas'
|
||||
;;
|
||||
hotcopy)
|
||||
options='--clean-logs'
|
||||
;;
|
||||
load)
|
||||
options='--ignore-uuid --force-uuid --parent-dir --quiet
|
||||
--use-pre-commit-hook --use-post-commit-hook'
|
||||
;;
|
||||
rmtxns)
|
||||
options='--quiet'
|
||||
;;
|
||||
setlog)
|
||||
options='--revision --bypass-hooks'
|
||||
;;
|
||||
esac
|
||||
|
||||
options+=" --help"
|
||||
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
||||
else
|
||||
if [[ "$command" == @(help|[h?]) ]]; then
|
||||
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
||||
else
|
||||
_filedir
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _svnadmin -o default svnadmin
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
|
@ -0,0 +1,64 @@
|
|||
# svnlook completion -*- shell-script -*-
|
||||
|
||||
# Use of this file is deprecated. Upstream completion is available in
|
||||
# subversion >= 0.12.0, use that instead.
|
||||
|
||||
_svnlook()
|
||||
{
|
||||
local cur prev words cword
|
||||
_init_completion || return
|
||||
|
||||
local commands
|
||||
commands='author cat changed date diff dirs-changed help ? h history info
|
||||
lock log propget pget pg proplist plist pl tree uuid youngest'
|
||||
|
||||
if [[ $cword -eq 1 ]] ; then
|
||||
if [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '--version' -- "$cur" ) )
|
||||
else
|
||||
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
||||
fi
|
||||
else
|
||||
local command=${words[1]}
|
||||
|
||||
if [[ "$cur" == -* ]]; then
|
||||
# possible options for the command
|
||||
local options
|
||||
case $command in
|
||||
author|cat|date|dirs-changed|info|log)
|
||||
options='--revision --transaction'
|
||||
;;
|
||||
changed)
|
||||
options='--revision --transaction --copy-info'
|
||||
;;
|
||||
diff)
|
||||
options='--revision --transaction --no-diff-deleted
|
||||
--no-diff-added --diff-copy-from'
|
||||
;;
|
||||
history)
|
||||
options='--revision --show-ids'
|
||||
;;
|
||||
propget|proplist)
|
||||
options='--revision --transaction --revprop'
|
||||
;;
|
||||
tree)
|
||||
options='--revision --transaction --show-ids --full-paths'
|
||||
;;
|
||||
esac
|
||||
|
||||
options+=" --help"
|
||||
COMPREPLY=( $( compgen -W "$options" -- "$cur" ) )
|
||||
else
|
||||
if [[ "$command" == @(help|[h?]) ]]; then
|
||||
COMPREPLY=( $( compgen -W "$commands" -- "$cur" ) )
|
||||
else
|
||||
_filedir
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
return 0
|
||||
} &&
|
||||
complete -F _svnlook -o default svnlook
|
||||
|
||||
# ex: ts=4 sw=4 et filetype=sh
|
Loading…
Reference in New Issue