Skip to content

Commit

Permalink
Add mirror-maker.
Browse files Browse the repository at this point in the history
Signed-off-by: Marios Andreopoulos <opensource@andmarios.com>
  • Loading branch information
andmarios committed Jun 17, 2017
1 parent d80b851 commit 533e6b1
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions src/kafka-mirror-maker
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# bash completion for kafka-mirror-maker -*- shell-script -*-

_landoop-kafka-mirror-maker() {
local cur prev opts wotherarg wfileargs wdirargs allopts
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
prev="${COMP_WORDS[COMP_CWORD-1]}"
wotherarg="--abort.on.send.failure \
--blacklist \
--consumer.rebalance.listener \
--message.handler \
--message.handler.args \
--num.streams \
--offset.commit.interval.ms \
--rebalance.listener.args \
--whitelist"
wfileargs="--consumer.config \
--producer.config"
wdirargs=""
opts="--help \
--new.consumer"

allopts="$wotherarg $opts $wfileargs $wdirargs"

case "$prev" in
@(${wfileargs// /|}))
_filedir
return 0
;;
@(${wdirargs// /|}))
_filedir -d
return 0
;;
@(${wotherarg// /|}))
return 0
;;
esac

if [[ ${cur} == -* ]] ; then
COMPREPLY=( $(compgen -W "${allopts}" -- ${cur}) )
return 0
fi
}

complete -F _landoop-kafka-mirror-maker kafka-mirror-maker

0 comments on commit 533e6b1

Please sign in to comment.