From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25433 invoked by alias); 22 Jun 2012 18:48:26 -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: 17157 Received: (qmail 18633 invoked from network); 22 Jun 2012 18:48:23 -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=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID,T_TO_NO_BRKTS_FREEMAIL autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.214.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=7oMaZG1NdxNLiNIUH+wHeOagqeA7FOHAGnwpcq4Z9V8=; b=nzVaaXItQ/Za0aNQ7ALvUsWLKDfNG9Vir4EeW4UNPeloe8Q4LaVag6ff7O8WbYudbY E7ZZKnRBo+qCagvl1WfxqTv/ysWav+wdLwbjXadX4QU+U6vNiKEpgRe3bRjSlVL0nm+T 2Oft9DEeoXdkFPl3GcKxXtsSyIjgWXNCfVVOsJ9ZzQxfRERcsUVvXgblJMa3bkJb3mdq /wXRBl5FdAXmpNBR9k3b2yPyWIHtf9xhjWy02zafS6Hh+RKRi/eQHLlXhlAvf+WlLEFF wQZnN9lwqqlSlv01oqaboWhZZG+3kU9vy3wWycw4NKtoPtxhWksqo3uuTcp7axw4Jcv0 Ds3A== MIME-Version: 1.0 Date: Fri, 22 Jun 2012 14:48:19 -0400 Message-ID: Subject: Re: known hosts tab completion From: Matt Woodson To: zsh-users@zsh.org Cc: d.s@daniel.shahaf.name Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I am reviving this question from a few months ago. =A0I have asked this question on stack exchange, and didn't get any answers. =A0I am really hoping someone here can help me out. http://unix.stackexchange.com/questions/35483/zsh-host-name-completion-beha= viour-change I have been using ZSH to do host name completion, and want to change the default behaviour. When I have multiple hosts with similar names, the completion does stuff that I don't care for. An example is best: Let's say I have these hosts: host01.stage.example.com host02.stage.example.com host01.prod.example.com host02.prod.example.com now, in my prompt, I will type: $ ssh hos zsh will show me: $ ssh host..example.com with the cursor right after "host" and shows me a menu with the host names in it. I like the menu showing me hostnames, I just don't want it to complete everything. Weird things happen. Most of the time I tab through and either have to delete host names or have extra stuff on the line i have to delete. A preferred way would be to not complete the rest of the hostname. something like: $ ssh hos zsh would hopefully show me: $ ssh host host01.stage.example.com host01.prod.example.com host02.stage.example.com host02.prod.example.com I have also noticed when i start putting in host names like: host-server01.stg.example.com host-server01.prod.example.com and I do my "ssh host", it will take me to the subdomain first. All i really want is this to complete like normal completion, and not dance around on me. Any thoughts?