From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16713 invoked by alias); 7 Apr 2015 18:37:12 -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: X-Seq: 20108 Received: (qmail 28523 invoked from network); 7 Apr 2015 18:37:07 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=MEYoiLu164nQNOotMfF/gfQhI5LASlM3U18JAxpaDEk=; b=n2H1Zj8dljzNyVNv2IRw4v0Lh5Vo9T00jb09wO4ZM/9LqMcS3Enl3Zj+RZmb3RORkF 7kKPDCj6yhPlXukdChloMBIiD7jucHg5CrOe4RerNfC3CWr3Wdg/1j8FhW9hxobKxW0h uMS4oHG22BR0LEi3XM/K01C3CZG9B413TE0sbrQ/umAIcKyjW7GABlqvndmpccT0FfkM d99O8cerFd7Fr1SxDr3Nz/L9rV39SibWquJ4nbrSgs5ZMtQwBPPfch2MdKt+LU2R7zzW kywpz6kdLyRkjk9AjDN2AuqTj4R3mWLv/gwGgoaTG4tI2d4uFbx5ODVdpMfQYqraSjuk 5F4A== MIME-Version: 1.0 X-Received: by 10.152.43.43 with SMTP id t11mr18891136lal.74.1428431820264; Tue, 07 Apr 2015 11:37:00 -0700 (PDT) In-Reply-To: <1797284.9M4pHoONQN@note> References: <1797284.9M4pHoONQN@note> Date: Tue, 7 Apr 2015 20:37:00 +0200 Message-ID: Subject: Re: Ssh completion from ~/.ssh/config From: =?UTF-8?Q?Jesper_Nyg=C3=A5rds?= To: zsh-users@zsh.org Content-Type: multipart/alternative; boundary=001a11c365943b9ab9051326b38f --001a11c365943b9ab9051326b38f Content-Type: text/plain; charset=UTF-8 Thank you for the tip, Vadim. This solves my problem, in a way. However, the existing _ssh file already has working code for parsing the .ssh/config file. Code which is far more readable, and doesn't require me to parse it myself with that hosts definition. For some reason though, someone has decided that it is not to be used. I would still prefer it if there was some way of configuring that I want to use the code that is already written, and that I prefer .ssh/config over .ssh/known_hosts. On Tue, Apr 7, 2015 at 4:27 PM, Vadim A. Misbakh-Soloviov wrote: > ``` > # Hostnames completion. > zstyle -e ':completion:*:hosts' hosts 'reply=( > ${${${${${(f)"$(<${HOME}/.ssh/known_hosts)"//\[/}//\]:/ }:#[\|]*}%%\ > *}%%,*} > ${${${(@M)${(f)"$(<${HOME}/.ssh/config)"}:#Host *}#Host }:#*[*?]*} > ${(s: :)${(ps:\t:)${${(f)~~"$( )' > zstyle ':completion:*:*:*:hosts' ignored-patterns 'ip6*' 'localhost*' > > > ``` --001a11c365943b9ab9051326b38f--