Blame bash-completion-repomanage
|
Ville Skyttä |
74f920 |
# -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
|
|
Ville Skyttä |
74f920 |
# ex: ts=8 sw=8 noet filetype=sh
|
|
Ville Skyttä |
74f920 |
#
|
|
Ville Skyttä |
74f920 |
# bash completion for repomanage
|
|
Ville Skyttä |
97aff0 |
|
|
Ville Skyttä |
74f920 |
have repomanage &&
|
|
Ville Skyttä |
97aff0 |
_repomanage()
|
|
Ville Skyttä |
97aff0 |
{
|
|
Ville Skyttä |
74f920 |
local cur prev
|
|
Ville Skyttä |
97aff0 |
|
|
Ville Skyttä |
74f920 |
COMPREPLY=()
|
|
Ville Skyttä |
74f920 |
cur=`_get_cword`
|
|
Ville Skyttä |
74f920 |
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
Ville Skyttä |
97aff0 |
|
|
Ville Skyttä |
74f920 |
[[ "$prev" == -@(h|-help|k|-keep) ]] && return 0
|
|
Ville Skyttä |
97aff0 |
|
|
Ville Skyttä |
74f920 |
if [[ "$cur" == -* ]] ; then
|
|
Ville Skyttä |
74f920 |
COMPREPLY=( $( compgen -W '-o --old -n --new -s --space -k \
|
|
Ville Skyttä |
74f920 |
--keep -c --nocheck -h --help' -- $cur ) )
|
|
Ville Skyttä |
74f920 |
else
|
|
Ville Skyttä |
74f920 |
_filedir -d
|
|
Ville Skyttä |
74f920 |
fi
|
|
Ville Skyttä |
74f920 |
} &&
|
|
Ville Skyttä |
74f920 |
complete -F _repomanage $filenames repomanage
|