bash-completion/bash-completion-mock
Ville Skyttä 192263e892 - Work around potential login problem in profile.d snippet (#174355).
Sat Nov 26 2005 Ville Skyttä <ville.skytta at iki.fi>
- Don't mark the main source file as %config.
- Make profile.d snippet non-executable (#35714) and noreplace.
- Add mock, plague-client and repomanage completion.
- Allow "cvs stat" completion.
- Macroize trigger creation.
2005-11-28 20:26:32 +00:00

34 lines
811 B
Bash

# bash completion for mock -*- sh -*-
_mock()
{
local cur prev
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
prev=${COMP_WORDS[COMP_CWORD-1]}
case $prev in
--@(result|state)dir)
_filedir -d
return 0
;;
-r)
COMPREPLY=( $( command ls /etc/mock | \
sed -ne 's/^\('$cur'.*\)\.cfg$/\1/p') )
return 0
;;
-@(-arch|-uniqueext|-help|h))
return 0
;;
esac
if [[ "$cur" == -* ]] ; then
COMPREPLY=( $( compgen -W '--version -h --help -r --no-clean --arch \
--debug --resultdir --statedir --uniqueext' -- $cur ) )
else
_filedir '?(no)src.rpm'
fi
}
complete -F _mock $filenames mock