From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A, RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 22276 invoked from network); 8 Mar 2021 15:59:14 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Mar 2021 15:59:14 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20200801; t=1615219154; b=GK+djZOULP77vLhVYcv+ZiZsaJGT1FVBC3drcYWxY8nN6K+qo8fDSfeKn7X8muYN/DGcszGWAX qN0BRfm3RIjPqWxXVkTcP87ajpLKbjs1o/2E2AS4VmF0g9tqiOidbosFowlZhgHrkvL8B3+bbF IhWYRQF963lPnJy4JcFt60PbsSok/LOZGmlTB/pk3Xeyg+WESMnqaTl+kEXgzZ1UNRYmbntiY7 K1L1rKht1G83fU+YtNIskHxB/bSZWf3vLeKMqa3QPRykmHoEJaQBzfTFtyblNKuRoidBcbVm3Y /Lh0EAO5E7mfc5GQXfVbLCEw0nParEXsqS8EAXNocVg7aQ==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (us-smtp-delivery-124.mimecast.com) smtp.remote-ip=63.128.21.124; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.a=rsa-sha256; dmarc=pass header.from=redhat.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20200801; t=1615219154; bh=LTLtVrkK/wuVip7a5W3THyery/8iyUuDYCwOkVH7pUc=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:To:Subject:Reply-To: DKIM-Signature:DKIM-Signature; b=h8yILf0ow8IA/j4T3w5oA2fIZK97nLGTwRsDBq5c+dkAAuV5ns2hUGp9OZoWyiEfFD8v8Pkm+A Gb5ovPt7vyMO0LANEjWeqRaplF7ItNYtAnlhj5CWCjMXzCR5tzMlANwp6CHyRJqlHORU4nGHyH 5spQnhF7u2OdNKIISpjbY+7v1/qkvEx0lWwconQ0oyWrwIPgPrSqaD7pzee2bFAhPPv7KMDm8A TwFiY1m+4ypSdiPT+3k5tlo2r4FmH6WXK0LcqSL/r6ahBAJ97L3TrXfAlI0gUP0CElFcSAP/Ox F4PVDoEXV7q69BwN/4IXl+OWXmB7ntWN+zIcgE3N8JWAIg==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20200801; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:To: Subject:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=a89TbkzuWYF1OiiS7QDqZ3RLhJCWd4ZuxP0kBBxhwhg=; b=S6N1Eq+o6EQKQPAkZEgmKWa6C7 6L/dveWzrP96VXoP7b6yZjs7hY5h4ph+75yHf+dTCljZ5POjGW3CgQXotWAFuwLhU6KMI4POxAW7S UDzY1wcDZTfnDq1NmoEB71P8SkPJwvxEj+w+WFbYsoHohYe0HYin1KFJ0ZsjB3f19vYK2A7TQXLjn Zm0QXPr6PdSL6gyKdiVC0yS/+A9SHdWMAoPRSqb08zK7Rz4uxqydn0ZK4Bc0OhnRXTvxh56zQulWP FJjI1YBQ4/VPWw5R9EGGqqf6T1Z2hiK4iIA6ygfseuCnVEZoUGgEGrczqv1L+vV55wMEsPIah7wFN oA7peLuA==; Received: from authenticated user by zero.zsh.org with local id 1lJIHo-00038s-MA; Mon, 08 Mar 2021 15:59:12 +0000 Authentication-Results: zsh.org; iprev=pass (us-smtp-delivery-124.mimecast.com) smtp.remote-ip=63.128.21.124; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.a=rsa-sha256; dmarc=pass header.from=redhat.com; arc=none Received: from us-smtp-delivery-124.mimecast.com ([63.128.21.124]:38564) by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-SHA384:256) id 1lJIHa-0002zP-10; Mon, 08 Mar 2021 15:58:58 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1615219136; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a89TbkzuWYF1OiiS7QDqZ3RLhJCWd4ZuxP0kBBxhwhg=; b=hGl9u093GTcyDs+adX2WpkdGanal8sboTO7gtfJdG4r9BMeYws5QsLJ1ZtVlkz3zHy5CCU ulMlZ0QvvtR0/E1sPMJc050sxsos1tdG000rjkZeQCGJxAoKO9fl4s4QR5P92VGuoCj9ij Aayd91DvvmlweXWAUdQkdacoB5BeCgw= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-518-YN4mAZh2MNSOyNdHPLmLWQ-1; Mon, 08 Mar 2021 10:58:52 -0500 X-MC-Unique: YN4mAZh2MNSOyNdHPLmLWQ-1 Received: by mail-ej1-f69.google.com with SMTP id au15so4292106ejc.8 for ; Mon, 08 Mar 2021 07:58:52 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:references:from:organization :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=a89TbkzuWYF1OiiS7QDqZ3RLhJCWd4ZuxP0kBBxhwhg=; b=FQe6/HKfOsPbuELN3GzUwrdtPL/Tse4LSEDqsgBpK18xFj2BuHXQCBq/KVLdeYuedr Qh1ELh7bxfFZgTa9NW7/r/mmRZ3SEkUT9agoOHQLXU/+dlyuXKIXI9noV6UZ/cpu8oSc IVsp/krXrgcUesMfvY86RKXw4CHYAowPJW5aZNQHzn8udk2DgWl+8u7m1X3yetWo3PsB 5akGO1VcTqxSTKM8KzVoHGqJGKgogOlgBOBy1A242rjw/uHwymszgBn3XNygB3b3Dts2 Qh+gGzKyZq8b6dR/2vLG7lGpk6sE8731AQMaUpezslzcKMYyq6LPi3u3OZLm6hHH/Z6r RmPQ== X-Gm-Message-State: AOAM532S350lNkon+uVmSBaAUmX4a/zSMhi3sxys1RNO8zg+8rmLdA0e Jd1PqkXXZoyIieorauyzgRHJOmXGJtWgrMq/LNJa2up1a/5qrt+uF19A+Z3B51WuoXC5/fMI7/x d5tv+HE5RxqmUyM4GNCIqdodZZX3L7BxC1ZHNgkKgsaX21fYSIAAgvTUTp9gJw2DK X-Received: by 2002:aa7:dc15:: with SMTP id b21mr7337713edu.350.1615219130907; Mon, 08 Mar 2021 07:58:50 -0800 (PST) X-Google-Smtp-Source: ABdhPJzcCWO+5FumeKSFDxnCIBKUA3u7AXFvKtRGS11SMrq9ZvwM3OnxARcuIa4st+8cfi8OM7nZ+g== X-Received: by 2002:aa7:dc15:: with SMTP id b21mr7337686edu.350.1615219130625; Mon, 08 Mar 2021 07:58:50 -0800 (PST) Received: from [192.168.1.102] (213-216-238-73.bb.dnainternet.fi. [213.216.238.73]) by smtp.gmail.com with ESMTPSA id ec18sm6876181ejb.24.2021.03.08.07.58.49 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Mar 2021 07:58:50 -0800 (PST) Reply-To: Marko Myllynen Subject: Re: OpenStack CLI completion To: Christian K , zsh-workers@zsh.org References: From: Marko Myllynen Organization: Red Hat Message-ID: <3e3a3655-cd05-b0dd-7d26-28ca45c7845c@redhat.com> Date: Mon, 8 Mar 2021 17:58:48 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=myllynen@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Seq: 48157 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Archived-At: Hi Christian, On 07/03/2021 20.11, Christian K wrote: > > I stumbled upon a bug in the completion for openstack command > introduced in https://www.zsh.org/mla/workers/2016/msg01936.html > > I noticed that the suggestions stop for further subcommands at a certain point. > An example: > `openstack vpn ` offers "endpoint", "ike", "ipsec" and "service" > – perfect, selecting "ipsec"! > `openstack vpn ipsec ` offers nothing – It should offer "policy", > "site" as can be seen here: > > [...] > > I have some idea how to fix this by making some assumptions but I am > not certain it's the right way. I would probably get rid of $subcmd > and just take the longest string of words connected by underscores as > $cmd to find the right suggestions. > Some barriers I currently have: > * There is also some substitution going on for colon which I just don't get I have a vague recollection that some (sub)command(s) had a slightly inconsistent output with colons somewhere which had to be removed for completions. Could have been just one or two such commands but unfortunately I don't remember exactly anymore. > * Why is there a check for not prefix-needed? > > Some comments from the original author would be quite helpful if he > still remembers why it was done a certain way :) Hmm, this one I don't remember, I guess this might be a common convention or something like that, probably not specific to _openstack. I haven't dealt with OpenStack recently so I can't actually test anything around it anymore but if you could fix the issue that would be great. Thanks, -- Marko Myllynen