[8/8] autocompletion: use hids instead of ids
Message ID | 1500998833-10543-9-git-send-email-jonatan.schlag@ipfire.org |
---|---|
State | New |
Headers |
Return-Path: <network-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (unknown [172.28.1.200]) by web02.ipfire.org (Postfix) with ESMTP id D40FB61CAF for <patchwork@ipfire.org>; Tue, 25 Jul 2017 18:07:29 +0200 (CEST) Received: from mail01.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id BF77227C8; Tue, 25 Jul 2017 18:07:29 +0200 (CEST) Received: from ipfire.localdomain (dslb-088-073-218-016.088.073.pools.vodafone-ip.de [88.73.218.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 39EA52769; Tue, 25 Jul 2017 18:07:27 +0200 (CEST) From: Jonatan Schlag <jonatan.schlag@ipfire.org> To: network@lists.ipfire.org Subject: [PATCH 8/8] autocompletion: use hids instead of ids Date: Tue, 25 Jul 2017 18:07:13 +0200 Message-Id: <1500998833-10543-9-git-send-email-jonatan.schlag@ipfire.org> X-Mailer: git-send-email 2.6.3 In-Reply-To: <1500998833-10543-1-git-send-email-jonatan.schlag@ipfire.org> References: <1500998833-10543-1-git-send-email-jonatan.schlag@ipfire.org> X-BeenThere: network@lists.ipfire.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List for the network package <network.lists.ipfire.org> List-Unsubscribe: <http://lists.ipfire.org/mailman/options/network>, <mailto:network-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/network/> List-Post: <mailto:network@lists.ipfire.org> List-Help: <mailto:network-request@lists.ipfire.org?subject=help> List-Subscribe: <http://lists.ipfire.org/mailman/listinfo/network>, <mailto:network-request@lists.ipfire.org?subject=subscribe> Errors-To: network-bounces@lists.ipfire.org Sender: "network" <network-bounces@lists.ipfire.org> |
Message
Jonatan Schlag
July 26, 2017, 2:07 a.m. UTC
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
---
src/bash-completion/network | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
On Tue, 2017-07-25 at 18:07 +0200, Jonatan Schlag wrote: > Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org> > --- > src/bash-completion/network | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/src/bash-completion/network b/src/bash-completion/network > index 820c2d4..529a772 100644 > --- a/src/bash-completion/network > +++ b/src/bash-completion/network > @@ -421,7 +421,7 @@ _network_zone_subcommand_config() { > > local words=( $@ ) > > - local commands="destroy list new $(network raw list-zone-config-ids > ${zone})" > + local commands="destroy list new $(network raw list-zone-config-hids > ${zone})" > > local cmd="$(_network_find_on_cmdline "${commands}")" > if [[ -z "${cmd}" ]]; then > @@ -442,7 +442,7 @@ _network_zone_subcommand_config() { > *) > # Check if we get a valid id > # TODO: We should also accept a valid hid > - if network raw zone-config-id-is-valid ${zone} > ${cmd}; then > + if network raw zone-config-id-is-valid ${zone} ${cmd} > || network raw zone-config-hid-is-valid ${zone} ${cmd}; then > _network_zone_subcommand_config_subcommand > ${zone} ${args} > fi > ;; Again, is it not smarter to assume that a HID has been given instead of an ID? Saves us a call of the second function... -Michael