From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michael Tremer To: network@lists.ipfire.org Subject: Re: [PATCH 8/8] autocompletion: use hids instead of ids Date: Tue, 25 Jul 2017 23:30:20 +0100 Message-ID: <1501021820.20312.37.camel@ipfire.org> In-Reply-To: <1500998833-10543-9-git-send-email-jonatan.schlag@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0755033455766657677==" List-Id: --===============0755033455766657677== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit On Tue, 2017-07-25 at 18:07 +0200, Jonatan Schlag wrote: > Signed-off-by: Jonatan Schlag > --- >  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 --===============0755033455766657677== Content-Type: application/pgp-signature Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="signature.asc" MIME-Version: 1.0 LS0tLS1CRUdJTiBQR1AgU0lHTkFUVVJFLS0tLS0KVmVyc2lvbjogR251UEcgdjIKCmlRSWNCQUFC Q2dBR0JRSlpkOFo5QUFvSkVJQjU4UDl2a0FrSGplUVAv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