diff options
author | dcorbacho <dparracorbacho@piotal.io> | 2020-11-18 14:27:41 +0000 |
---|---|---|
committer | dcorbacho <dparracorbacho@piotal.io> | 2020-11-18 14:27:41 +0000 |
commit | f23a51261d9502ec39df0f8db47ba6b22aa7659f (patch) | |
tree | 53dcdf46e7dc2c14e81ee960bce8793879b488d3 /scripts/zsh_autocomplete.sh | |
parent | afa2c2bf6c7e0e9b63f4fb53dc931c70388e1c82 (diff) | |
parent | 9f6d64ec4a4b1eeac24d7846c5c64fd96798d892 (diff) | |
download | rabbitmq-server-git-stream-timestamp-offset.tar.gz |
Merge remote-tracking branch 'origin/master' into stream-timestamp-offsetstream-timestamp-offset
Diffstat (limited to 'scripts/zsh_autocomplete.sh')
-rw-r--r-- | scripts/zsh_autocomplete.sh | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/scripts/zsh_autocomplete.sh b/scripts/zsh_autocomplete.sh new file mode 100644 index 0000000000..b027571379 --- /dev/null +++ b/scripts/zsh_autocomplete.sh @@ -0,0 +1,16 @@ +_rabbitmqctl_complete() { + if [ -x /usr/lib/rabbitmq/bin/rabbitmqctl ]; then + local word completions a + local LANG=en_US.UTF-8 + read -cl a + word="$1" + completions="$(export LANG=en_US.UTF-8; export LC_CTYPE=en_US.UTF-8; /usr/lib/rabbitmq/bin/rabbitmqctl --auto-complete ${=a})" + reply=( "${(ps:\n:)completions}" ) + fi +} + +compctl -f -K _rabbitmqctl_complete rabbitmqctl + +compctl -f -K _rabbitmqctl_complete rabbitmq-plugins + +compctl -f -K _rabbitmqctl_complete rabbitmq-diagnostics
\ No newline at end of file |