From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3814 invoked by alias); 22 Mar 2018 00:27:21 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 23268 Received: (qmail 28751 invoked by uid 1010); 22 Mar 2018 00:27:21 -0000 X-Qmail-Scanner-Diagnostics: from park01.gkg.net by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(205.235.26.22):SA:0(-1.4/5.0):. Processed in 6.445985 secs); 22 Mar 2018 00:27:21 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, SPF_PASS,T_DKIM_INVALID,T_RP_MATCHES_RCVD autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: SRS0=BFS/=GM=yahoo.co.uk=okiddle@bounces.park01.gkg.net X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | X-Virus-Scanned: by amavisd-new at gkg.net Authentication-Results: amavisd4.gkg.net (amavisd-new); dkim=pass (2048-bit key) header.d=yahoo.co.uk X-Greylist: domain auto-whitelisted by SQLgrey-1.8.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1521678414; bh=H4IgO0BNAwh++VlDty89PK8flh7EZbRBa4zHOh+8Who=; h=From:References:To:Subject:Date:From:Subject; b=GPzthmliRvIvzuftehGEBS5SC4UIyme9nvIr1SQNQ4m69n5hhd5pPllrAtNwB9iNB+DM/8AsW/nbYtjgDeXrB8GbaXjs1QrrTdmdneCrc1bPBFDx653w3LCUHesRIwBq3YXpB1aVc9HmMhrR/nZPTKFPbOwgMW5NAf8IC5pjwf9g/9uQ98Aa96iq/a9+HvWIneMOhk1HVhZkkcxyE8KHE6bCEXXTL/DLRVM5uqV2oIaeLfTupwMzXo/WNbwNw6IzRnrOTVljXlq9uyFOFB/9+8P28+++F8jsR/8wDEPVjA8W10nZ7rnjCeqKLct+l2kW3ntysqFDd94eeab7yrZrIw== X-YMail-OSG: .PR9.v8VM1kf7Hmpo.dsK.Z5jd5k3eLDiX0QXD7GgoL_ZAQq6TyWg3Mv9rvCIKq GbDzL.3K5kWQaZNOdqO56hQvU49dmXAkZ.L2F1UxO1zY9pu8XwyGyjgP3tkLIDNIRiYqGqgqiO2Y 53CFmBnjYX7SLHI7EE7aZgKYObuuzMKCE_ZMssDcVptpHl9zzZDSUnes4PtVYgKma8APOI29efvV RsTb03XcGQcXuTOjz7kMS1ZINkrL9qo2kmNaKbtPak3A4MO0yNykdT_Wijfzv8.PEfXOwZojM62J 78fnEiP_RiqhO6kPue5VsxIT4mHG8sBnwInztCj3DHUSPzIppcGCtoobAUHmfn_o4Ie_H1RYNkUt _RAZiQ8jKcXxKmXUf6DwuEAcHOgLKskwMdJKAVhBhUq2X05foNuQTm_SCjdOp3ZdL9SlJMnVgdFQ RwNhYYvR69fbK6lTcvbrV4MGjqsesEks9XnuVFRKBSzpExYRFMM4QV8tq54D7PEh6SEd.Bb0WH0L UfqPq3x9M_w-- cc: zsh-users@zsh.org In-reply-to: From: Oliver Kiddle References: To: John Benninghoff Subject: Re: ssh host completion MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <25762.1521678403.1@thecus> Date: Thu, 22 Mar 2018 01:26:43 +0100 Message-ID: <25763.1521678403@thecus> On 27 Feb, John Benninghoff wrote: > the host names configured in my ~/.ssh/config file. I use the following > section in my .zshrc file to try to get the desired behavior: > > if [[ -r ~/.ssh/config ]]; then > sconf=( $(sed -n '/^Host[=\t ]/{s///;s/#.*//;p;}' ~/.ssh/config) ) > zstyle ':completion::complete:ssh:argument-1:' tag-order !users > zstyle ':completion::*:ssh:*:' hosts $sconf I think the context for this zstyle won't match. Try something like: zstyle ':completion::*:ssh:*:hosts' hosts $sconf or perhaps just: zstyle ':completion::*:ssh:*' hosts $sconf If that doesn't help, try experimenting with the users-hosts style. That needs a context like ':completion:*:ssh:*:my-accounts'. It also expects usernames in the style values. > # Use ^Xh to see context and tags applicable in CLI position Also useful is ^X? to do a full trace. If you view the trace with less, filtering it with & can be very useful. > :completion::complete:ssh:argument-1: !users A similar but slightly different option is to just hide the users: zstyle ':completion:*:ssh:*:users' hidden true Sorry that your message didn't get answered sooner. Oliver