From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1914 invoked by alias); 25 Mar 2018 04:05:54 -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: 23273 Received: (qmail 14178 invoked by uid 1010); 25 Mar 2018 04:05:54 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf0-f49.google.com 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(209.85.215.49):SA:0(-1.9/5.0):. Processed in 1.310333 secs); 25 Mar 2018 04:05:54 -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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM, HTML_MESSAGE,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_PASS, T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: john.benninghoff@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=BXzXoUIUBI0NOoR3nt/q0r2I0oTms1q7faG8h9gsaC0=; b=vN0NDeiEv0uKarQpVjcG7NOxJXcAP6Jm86i11H5DS+s8R9QsANjEAtfO6lO/1rhIkz DjMwj3MdCgIMWwAsey85cmLrFPedngqWfnGEimLUpj7TFdCJk1G8pbi96vaxKDP2U/D4 a05iN2bfCb4ZAUnEu96Ofts8ABRE8QMGNLawof/JqfLRliK/o0fx1LkwK0gHqn5pGCxA xrsgXwdmMDBUMyi0YRPUVwvg8edicrY6QxzqW+C0gS2Z6E/x/RH3xcSJ5ThlrMaI6/QY ivmYVlVmMIV02RFATZZ4Jg0A9vz2fsOineC3gAjz3is6w8ZfBmMevgYeuyJX9k8BOe7M HavQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=BXzXoUIUBI0NOoR3nt/q0r2I0oTms1q7faG8h9gsaC0=; b=Dd4auGcKj4Wjlvxxi6VK7iskaLe/01Si1WIn1Nb1oubVe1DwoYoIRl9uLibovltmxJ 74TNZFQKp9BolrrPaT89fbFfeE3BqwNEjKMlc+O9a/PxeJvtO+rWzHlaGQ+S4uXYNpRk 2fiLrllEn5I/M0B+t8GbL5me7uYdBko0zA/j02iNSFf/RpeNVIimKUxmLjVnx1NxUEr5 2QP/z0ce1kdQIAK50XHvUKwzj7Dv0V2Hw9aaUgJdurN4qBqxxPiAwpwAtEvM1BhwZJjA JMhGZ+DY2jz7NPB4M8wWJ4dUC/hUg2fIjo5f9TFUBIIXBypeazhxryNxdnO0VHjrY+gS iedA== X-Gm-Message-State: AElRT7GfZRTtatAK2o+wTfdGnkvX8PaS8GnLs4SAfYgQPT+w/2P0oe0S 4wuVoczC8a5bcw/6gK6FF21shqbn3dd98mjNoi8= X-Google-Smtp-Source: AG47ELuBdb/B7V0xwtoKUu3nFI9EZrbSry2UzBghNzrCay0XfyF3xA2PrSWlY9aWDSkv3hNZYXydaAhZZfAJi0MxcA8= X-Received: by 2002:a19:9fc4:: with SMTP id i187-v6mr12926849lfe.7.1521950748222; Sat, 24 Mar 2018 21:05:48 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <25763.1521678403@thecus> References: <25763.1521678403@thecus> From: John Benninghoff Date: Sat, 24 Mar 2018 21:05:47 -0700 Message-ID: Subject: Re: ssh host completion To: Oliver Kiddle Cc: zsh-users@zsh.org Content-Type: multipart/alternative; boundary="000000000000b6aacc056834c5f4" --000000000000b6aacc056834c5f4 Content-Type: text/plain; charset="UTF-8" Thanks, the first context suggestion worked. /John On Wed, Mar 21, 2018 at 5:26 PM, Oliver Kiddle wrote: > 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 > --000000000000b6aacc056834c5f4--