From 806156af64ee28af513e79c4b1fc2ae58fd9e572 Mon Sep 17 00:00:00 2001 From: caes Date: Tue, 26 May 2020 02:39:27 -0400 Subject: [PATCH] Added tab completions script. --- tab_completions.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 tab_completions.sh diff --git a/tab_completions.sh b/tab_completions.sh new file mode 100644 index 0000000..1173e4d --- /dev/null +++ b/tab_completions.sh @@ -0,0 +1,10 @@ +#!/usr/bin/env bash + +_broker () { + local cur=${COMP_WORDS[COMP_CWORD]} + reply_list=$(grep "()" broker.sh|cut -d' ' -f1|grep -v "()") + COMPREPLY=( $( compgen -W "$reply_list" -- $cur ) ) + return 0 +} + +complete -F _broker -o filenames ./broker.sh \ No newline at end of file