From: Jani Nikula Date: Sat, 17 Oct 2015 16:30:03 +0000 (+0300) Subject: [PATCH 3/3] completion: clean up top level completion X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=965d3491ddfc50246ce29a839ff27651da341100;p=notmuch-archives.git [PATCH 3/3] completion: clean up top level completion --- diff --git a/7e/5f1ed607fa4626d0495407aa3ee4a8941e2c18 b/7e/5f1ed607fa4626d0495407aa3ee4a8941e2c18 new file mode 100644 index 000000000..0dc9683d1 --- /dev/null +++ b/7e/5f1ed607fa4626d0495407aa3ee4a8941e2c18 @@ -0,0 +1,97 @@ +Return-Path: +X-Original-To: notmuch@notmuchmail.org +Delivered-To: notmuch@notmuchmail.org +Received: from localhost (localhost [127.0.0.1]) + by arlo.cworth.org (Postfix) with ESMTP id 09A6B6DE19CE + for ; Sat, 17 Oct 2015 09:30:38 -0700 (PDT) +X-Virus-Scanned: Debian amavisd-new at cworth.org +X-Spam-Flag: NO +X-Spam-Score: -0.539 +X-Spam-Level: +X-Spam-Status: No, score=-0.539 tagged_above=-999 required=5 tests=[AWL=0.181, + RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01] + autolearn=disabled +Received: from arlo.cworth.org ([127.0.0.1]) + by localhost (arlo.cworth.org [127.0.0.1]) (amavisd-new, port 10024) + with ESMTP id lvFmVd0nDFCu for ; + Sat, 17 Oct 2015 09:30:36 -0700 (PDT) +Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com + [209.85.212.180]) + by arlo.cworth.org (Postfix) with ESMTPS id 170256DE02DD + for ; Sat, 17 Oct 2015 09:30:36 -0700 (PDT) +Received: by wicll6 with SMTP id ll6so45288116wic.0 + for ; Sat, 17 Oct 2015 09:30:34 -0700 (PDT) +X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; + d=1e100.net; s=20130820; + h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to + :references; + bh=RiP6Gnm44jJ9B3u/lyIvwbZrL16/0k1jkxqrhcZpwJg=; + b=W5w1Y26Dl+Uvtct+OFIC47ClaBpRZHJkuIye7j7WakA+uSYCqPbOuQzz7BFS8wPaQH + wW+wiPhUViVptLc0rQwmp3f2OGkxLmA7+fVXqlcj0+CXjYA2sFtWqAaP3J7ejS8deu8Z + fdFkjIBNlZ3s7a0RtzVmHXDOpHPDkNDt2ubKpz+FblZcVhwQpABrqGsiFYfit2j1J0ol + o3+zSq0llWtW8qMkq24WcOqiTOMVz3FwClCXxz4/Kr0441qn4KR1uKo2hBwSTxkvSai5 + +81V40L8llVyoXGPX5bfCjba0ENNB9wXyXI4e76vfqb2HCz7VejbcjK6Y+yv+RFJ6+mz + 7s8g== +X-Gm-Message-State: + ALoCoQnCQrk8CYv1gat3Lv2y1bdvLfhzTSTl/ccatIxz3x9ahQ2VWBh7q6HG67ttCo9bnM8P2oeO +X-Received: by 10.194.118.234 with SMTP id kp10mr3843296wjb.59.1445099434537; + Sat, 17 Oct 2015 09:30:34 -0700 (PDT) +Received: from localhost (mobile-access-bcee43-111.dhcp.inet.fi. + [188.238.67.111]) + by smtp.gmail.com with ESMTPSA id go5sm7682607wib.3.2015.10.17.09.30.33 + (version=TLSv1/SSLv3 cipher=OTHER); + Sat, 17 Oct 2015 09:30:34 -0700 (PDT) +From: Jani Nikula +To: notmuch@notmuchmail.org +Subject: [PATCH 3/3] completion: clean up top level completion +Date: Sat, 17 Oct 2015 19:30:03 +0300 +Message-Id: <1445099403-25998-3-git-send-email-jani@nikula.org> +X-Mailer: git-send-email 2.1.4 +In-Reply-To: <1445099403-25998-1-git-send-email-jani@nikula.org> +References: <1443265970-9875-1-git-send-email-jani@nikula.org> + <1445099403-25998-1-git-send-email-jani@nikula.org> +X-BeenThere: notmuch@notmuchmail.org +X-Mailman-Version: 2.1.18 +Precedence: list +List-Id: "Use and development of the notmuch mail system." + +List-Unsubscribe: , + +List-Archive: +List-Post: +List-Help: +List-Subscribe: , + +X-List-Received-Date: Sat, 17 Oct 2015 16:30:38 -0000 + +Add note about missing features. +--- + completion/notmuch-completion.bash | 11 ++++++++--- + 1 file changed, 8 insertions(+), 3 deletions(-) + +diff --git a/completion/notmuch-completion.bash b/completion/notmuch-completion.bash +index 1356c4a40515..f24d9ecd337f 100644 +--- a/completion/notmuch-completion.bash ++++ b/completion/notmuch-completion.bash +@@ -484,10 +484,15 @@ _notmuch() + + if [ -z "${arg}" ]; then + # top level completion +- local top_options="--help --version" + case "${cur}" in +- -*) COMPREPLY=( $(compgen -W "${top_options}" -- ${cur}) ) ;; +- *) COMPREPLY=( $(compgen -W "${_notmuch_commands}" -- ${cur}) ) ;; ++ -*) ++ # XXX: handle ${_notmuch_shared_options} and --config= ++ local options="--help --version" ++ COMPREPLY=( $(compgen -W "${options}" -- ${cur}) ) ++ ;; ++ *) ++ COMPREPLY=( $(compgen -W "${_notmuch_commands}" -- ${cur}) ) ++ ;; + esac + elif [ "${arg}" = "help" ]; then + # handle help command specially due to _notmuch_commands usage +-- +2.1.4 +