From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 865443ed for ; Wed, 17 Jul 2019 19:43:02 +0000 (UTC) Received: (qmail 25695 invoked by alias); 17 Jul 2019 19:42:51 -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: 24075 Received: (qmail 19749 invoked by uid 1010); 17 Jul 2019 19:42:51 -0000 X-Qmail-Scanner-Diagnostics: from mail-wm1-f42.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.101.2/25510. spamassassin: 3.4.2. Clear:RC:0(209.85.128.42):SA:0(-2.0/5.0):. Processed in 3.398632 secs); 17 Jul 2019 19:42:51 -0000 X-Envelope-From: luomat@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.128.42 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=473CrbsUytrc72disw7rdJImzin+AM6bGOjxmF7KGaw=; b=azdvsw5oLyfD11NBMoP83/esJQRzaZBMCTL0OSZ2GMQqtIeCMosBBieb3hrfiYUwMz S/6cGHvsgOR2S4wUiuzWS8fnHCJI1CDOqJ7YMIzGrKVK7hgsZIVUsWMIJFCmURPCnUZ6 OLmCkVYW4QIlzw0w1KtjHpTubn43GtyLZfmiDS6G1bz/1w+jOP0bPSfR8vP6kFc/lvbG XKysvQWa6IpOkwc6Y03X7QOJsmmSRpZ8AtpSQZHW6ysY24uSktmhy15jVsVVurkerKwi 9P5z/E28crsTld3s94aFM/53ku+2e5Q5/3CGFmAwy2JIOVJFqqrL9cR9LexjEy4NLqWR vhXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=473CrbsUytrc72disw7rdJImzin+AM6bGOjxmF7KGaw=; b=dfqpbDWFNxiSJWYARH9OfbHgOBQTzgJPi2iGaDp+K5clFkzBD6BuUBNl57v9rFaVJB tyi7KDsATZC0bwx9sBtlIFC6wpSqgIp+QRBM1mbngz3hehjo+JXScx8HfpFEnqSGuY1x /C5NpzQIJtt+1ePuFoBRH3OyGp7L/wgZtC+s896dt0uAmrZ8gLs+tyaIdw1qXTUkzYke rRx0yJlXj2xM/ak6UEUnzCYGi9AOVtDg6feGhRV4bVoXEx13FS8zpGofkOkVi1LsOmbT RFTEuqeftgn6ASC7tzsr4RuEywy+I6oVPqE2w1yXstqY6cpH+jpaE+SWVMv84B1kHvnN VM6A== X-Gm-Message-State: APjAAAXnUE3XThx+srHW1iU2r7nOh1vwRRtlsfI9unqrvqOcRedb092W VRCKRN3WPSiKmAxOy+C75th6U8Eo453pcE35ag1RMpnrNYo= X-Google-Smtp-Source: APXvYqxpfv4QoE2exD6dKNzk8HA+2vaSnXXpwcx49eXKsQ5h643+sCJQscjL9dTHEKmgi8MRbhxAUUjLPjqRXFSPFFc= X-Received: by 2002:a1c:2d8b:: with SMTP id t133mr38009753wmt.57.1563392531834; Wed, 17 Jul 2019 12:42:11 -0700 (PDT) MIME-Version: 1.0 From: TJ Luoma Date: Wed, 17 Jul 2019 15:41:34 -0400 Message-ID: Subject: tab completion for ssh using FQDN To: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" I have several hosts defined in ~/.ssh/config like so: Host myhost HostName myhost.luo.ma User myuser Port 5555 Something changed, because now when I type "ssh my[tab]" I get "ssh myhost.luo.ma" instead of "ssh myhost" which then fails because it isn't using the port specified in ~/.ssh/config. I _think_ it has to do with the ~/.ssh/known_hosts file, because if I delete the entry from that file, tab completion seems to work as I expect. I've looked around for a solution, and it appears that if I add this line: HostKeyAlias myhost then the short hostname gets uses for the known_hosts file, but I'm not sure if that's a "good" solution or not. Is there a way to tell zsh to only do tab-completion for ssh out of ~/.ssh/config and ignore ~/.ssh/known_hosts ? Thanks! -- TJ Luoma TJ @ MacStories Personal Website: luo.ma (aka RhymesWithDiploma.com) Twitter: @tjluoma