From 2e33d7d6a73ef53ab57df97cc5f68df7a361e871 Mon Sep 17 00:00:00 2001 From: fluzzi Date: Mon, 4 Apr 2022 19:33:47 -0300 Subject: [PATCH] add new commands to completion --- connpy/connapp.py | 10 ++++++++++ docs/connpy/index.html | 10 ++++++++++ 2 files changed, 20 insertions(+) diff --git a/connpy/connapp.py b/connpy/connapp.py index 2cd13f6..d2942f0 100755 --- a/connpy/connapp.py +++ b/connpy/connapp.py @@ -723,6 +723,11 @@ _conn() strings="$strings ${profiles[@]}" fi fi + if [ "${COMP_WORDS[1]}" = "config" ]; then + if [[ "${COMP_WORDS[2]}" = "--completion" ]] ; then + strings="bash zsh" + fi + fi COMPREPLY=($(compgen -W "$strings" -- "${COMP_WORDS[3]}")) fi } @@ -781,6 +786,11 @@ _conn() strings="$strings ${profiles[@]}" fi fi + if [ "${COMP_WORDS[2]}" = "config" ]; then + if [[ "${COMP_WORDS[3]}" = '--completion' ]] ; then + strings="bash zsh" + fi + fi compadd "$@" -- `echo $strings` fi diff --git a/docs/connpy/index.html b/docs/connpy/index.html index a9ee016..ec71a66 100644 --- a/docs/connpy/index.html +++ b/docs/connpy/index.html @@ -1322,6 +1322,11 @@ _conn() strings="$strings ${profiles[@]}" fi fi + if [ "${COMP_WORDS[1]}" = "config" ]; then + if [[ "${COMP_WORDS[2]}" = "--completion" ]] ; then + strings="bash zsh" + fi + fi COMPREPLY=($(compgen -W "$strings" -- "${COMP_WORDS[3]}")) fi } @@ -1380,6 +1385,11 @@ _conn() strings="$strings ${profiles[@]}" fi fi + if [ "${COMP_WORDS[2]}" = "config" ]; then + if [[ "${COMP_WORDS[3]}" = '--completion' ]] ; then + strings="bash zsh" + fi + fi compadd "$@" -- `echo $strings` fi