- Trigger-install support for gcl, lilypond, mercurial and svk.
- Improve mock completion a bit.
This commit is contained in:
parent
6fca31966e
commit
c2f930c698
@ -2,19 +2,28 @@
|
|||||||
|
|
||||||
_mock()
|
_mock()
|
||||||
{
|
{
|
||||||
local cur prev
|
local cur prev commands cfgdir
|
||||||
|
|
||||||
COMPREPLY=()
|
COMPREPLY=()
|
||||||
cur=${COMP_WORDS[COMP_CWORD]}
|
cur=${COMP_WORDS[COMP_CWORD]}
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
commands='rebuild chroot init clean shell'
|
||||||
|
cfgdir=/etc/mock
|
||||||
|
|
||||||
|
count=0
|
||||||
|
for i in ${COMP_WORDS[@]} ; do
|
||||||
|
[ $count -eq $COMP_CWORD ] && break
|
||||||
|
[ "$i" == --configdir ] && cfgdir="${COMP_WORDS[((count+1))]}"
|
||||||
|
count=$((++count))
|
||||||
|
done
|
||||||
|
|
||||||
case $prev in
|
case $prev in
|
||||||
--@(result|state)dir)
|
--@(config|result|state)dir)
|
||||||
_filedir -d
|
_filedir -d
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
-r)
|
-r)
|
||||||
COMPREPLY=( $( command ls /etc/mock | \
|
COMPREPLY=( $( command ls $cfgdir | \
|
||||||
sed -ne 's/^\('$cur'.*\)\.cfg$/\1/p') )
|
sed -ne 's/^\('$cur'.*\)\.cfg$/\1/p') )
|
||||||
return 0
|
return 0
|
||||||
;;
|
;;
|
||||||
@ -23,9 +32,11 @@ _mock()
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# TODO: process $commands
|
||||||
if [[ "$cur" == -* ]] ; then
|
if [[ "$cur" == -* ]] ; then
|
||||||
COMPREPLY=( $( compgen -W '--version -h --help -r --no-clean --arch \
|
COMPREPLY=( $( compgen -W '--version -h --help -r --no-clean --arch \
|
||||||
--debug --resultdir --statedir --uniqueext' -- $cur ) )
|
--debug --resultdir --statedir --uniqueext --configdir --quiet \
|
||||||
|
--autocache --rebuildcache' -- $cur ) )
|
||||||
else
|
else
|
||||||
_filedir '?(no)src.rpm'
|
_filedir '?(no)src.rpm'
|
||||||
fi
|
fi
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: bash-completion
|
Name: bash-completion
|
||||||
Version: 20060301
|
Version: 20060301
|
||||||
Release: 1%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: Programmable completion for Bash
|
Summary: Programmable completion for Bash
|
||||||
|
|
||||||
Group: System Environment/Shells
|
Group: System Environment/Shells
|
||||||
@ -60,16 +60,22 @@ fi\
|
|||||||
[ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/%{?2}%{!?2:%1}\
|
[ $2 -gt 0 ] || rm -f %{_sysconfdir}/bash_completion.d/%{?2}%{!?2:%1}\
|
||||||
%{nil}
|
%{nil}
|
||||||
|
|
||||||
|
# Not handled (yet?):
|
||||||
|
# bitkeeper, dsniff, harbour, larch, lisp, p4, povray, sitecopy
|
||||||
%bashcomp_trigger bittorrent
|
%bashcomp_trigger bittorrent
|
||||||
%bashcomp_trigger cksfv
|
%bashcomp_trigger cksfv
|
||||||
%bashcomp_trigger clisp
|
%bashcomp_trigger clisp
|
||||||
%bashcomp_trigger freeciv
|
%bashcomp_trigger freeciv
|
||||||
%bashcomp_trigger gcc-gnat gnatmake
|
%bashcomp_trigger gcc-gnat gnatmake
|
||||||
|
%bashcomp_trigger gcl
|
||||||
%bashcomp_trigger gkrellm
|
%bashcomp_trigger gkrellm
|
||||||
|
%bashcomp_trigger lilypond
|
||||||
%bashcomp_trigger mailman
|
%bashcomp_trigger mailman
|
||||||
%bashcomp_trigger mcrypt
|
%bashcomp_trigger mcrypt
|
||||||
|
%bashcomp_trigger mercurial hg
|
||||||
%bashcomp_trigger mock
|
%bashcomp_trigger mock
|
||||||
%bashcomp_trigger mtx
|
%bashcomp_trigger mtx
|
||||||
|
%bashcomp_trigger perl-SVK svk
|
||||||
%bashcomp_trigger plague-client
|
%bashcomp_trigger plague-client
|
||||||
%bashcomp_trigger ruby-ri ri
|
%bashcomp_trigger ruby-ri ri
|
||||||
%bashcomp_trigger sbcl
|
%bashcomp_trigger sbcl
|
||||||
@ -90,6 +96,10 @@ fi\
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Aug 31 2006 Ville Skyttä <ville.skytta at iki.fi> - 20060301-2
|
||||||
|
- Trigger-install support for gcl, lilypond, mercurial and svk.
|
||||||
|
- Improve mock completion a bit.
|
||||||
|
|
||||||
* Thu Mar 2 2006 Ville Skyttä <ville.skytta at iki.fi> - 20060301-1
|
* Thu Mar 2 2006 Ville Skyttä <ville.skytta at iki.fi> - 20060301-1
|
||||||
- 20060301, patches and profile.d scriptlet applied/included upstream.
|
- 20060301, patches and profile.d scriptlet applied/included upstream.
|
||||||
- Convert docs to UTF-8.
|
- Convert docs to UTF-8.
|
||||||
|
Loading…
Reference in New Issue
Block a user