Reindent.
git-svn-id: svn+ssh://rpmlint.zarb.org/home/projects/rpmlint/svn/trunk@1660 9bc8b190-ac0f-0410-8968-dc7d1f502856
This commit is contained in:
parent
9f9bc75f3f
commit
4586a3a722
|
@ -1,72 +1,73 @@
|
||||||
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
|
# bash-completion add-on for rpmlint
|
||||||
# ex: ts=8 sw=8 et filetype=sh
|
|
||||||
#
|
|
||||||
# bash-completion add-on for rpmlint(1)
|
|
||||||
# http://bash-completion.alioth.debian.org/
|
# http://bash-completion.alioth.debian.org/
|
||||||
|
|
||||||
_rpmlint()
|
_rpmlint()
|
||||||
{
|
{
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
local cur=$2 # for _rpm_installed_packages, _filedir
|
local cur=$2 # for _rpm_installed_packages, _filedir
|
||||||
|
|
||||||
case $3 in
|
case $3 in
|
||||||
-C|--checkdir|-E|--extractdir)
|
-C|--checkdir|-E|--extractdir)
|
||||||
_filedir -d
|
_filedir -d
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-f|--file)
|
-f|--file)
|
||||||
_filedir
|
_filedir
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-I|-c|--check|-o|--option)
|
-I|-c|--check|-o|--option)
|
||||||
# argument required but no completions available
|
# argument required but no completions available
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
if [[ "$cur" == -* ]]; then
|
||||||
if [[ "$cur" == -* ]]; then
|
COMPREPLY=( $( compgen -W '--info -I --check --all --checkdir
|
||||||
COMPREPLY=( $( compgen -W '--info -I --check --all --checkdir
|
--help --verbose --extractdir --version --noexception
|
||||||
--help --verbose --extractdir --version --noexception
|
--file --option' -- "$cur" ) )
|
||||||
--file --option' -- "$cur" ) )
|
else
|
||||||
else
|
# Installed packages completion is slow, do it only if arg does not
|
||||||
# Installed packages completion is slow, do it only if arg
|
# look like a path.
|
||||||
# does not look like a path.
|
if [[ "$cur" != */* ]]; then
|
||||||
if [[ "$cur" != */* ]]; then
|
type _rpm_installed_packages &>/dev/null && _rpm_installed_packages
|
||||||
type _rpm_installed_packages &>/dev/null && \
|
fi
|
||||||
_rpm_installed_packages
|
_filedir '@(rpm|spec)'
|
||||||
fi
|
fi
|
||||||
_filedir '@(rpm|spec)'
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
complete -F _rpmlint -o filenames rpmlint
|
complete -F _rpmlint -o filenames rpmlint
|
||||||
|
|
||||||
_rpmdiff()
|
_rpmdiff()
|
||||||
{
|
{
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
local cur=$2 # for _rpm_installed_packages, _filedir
|
local cur=$2 # for _rpm_installed_packages, _filedir
|
||||||
|
|
||||||
case $3 in
|
case $3 in
|
||||||
-i|--ignore)
|
-i|--ignore)
|
||||||
COMPREPLY=( $( compgen -W 'S M 5 D N L V U G F T' \
|
COMPREPLY=( $( compgen -W 'S M 5 D N L V U G F T' -- $cur ) )
|
||||||
-- $cur ) )
|
return 0
|
||||||
return 0
|
;;
|
||||||
;;
|
-h|--help)
|
||||||
-h|--help)
|
return 0
|
||||||
return 0
|
;;
|
||||||
;;
|
esac
|
||||||
esac
|
|
||||||
|
|
||||||
if [[ "$cur" == -* ]]; then
|
if [[ "$cur" == -* ]]; then
|
||||||
COMPREPLY=( $( compgen -W '-h --help -i --ignore' -- "$cur" ) )
|
COMPREPLY=( $( compgen -W '-h --help -i --ignore' -- "$cur" ) )
|
||||||
else
|
else
|
||||||
# Installed packages completion is slow, do it only if arg
|
# Installed packages completion is slow, do it only if arg does not
|
||||||
# does not look like a path.
|
# look like a path.
|
||||||
if [[ "$cur" != */* ]]; then
|
if [[ "$cur" != */* ]]; then
|
||||||
type _rpm_installed_packages &>/dev/null && \
|
type _rpm_installed_packages &>/dev/null && _rpm_installed_packages
|
||||||
_rpm_installed_packages
|
fi
|
||||||
fi
|
_filedir rpm
|
||||||
_filedir rpm
|
fi
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
complete -F _rpmdiff -o filenames rpmdiff
|
complete -F _rpmdiff -o filenames rpmdiff
|
||||||
|
|
||||||
|
# Local variables:
|
||||||
|
# mode: shell-script
|
||||||
|
# sh-basic-offset: 4
|
||||||
|
# sh-indent-comment: t
|
||||||
|
# indent-tabs-mode: nil
|
||||||
|
# End:
|
||||||
|
# ex: ts=4 sw=4 et filetype=sh
|
||||||
|
|
Loading…
Reference in New Issue