From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26666 invoked by alias); 4 Apr 2012 08:06:55 -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: 16982 Received: (qmail 13545 invoked from network); 4 Apr 2012 08:06:53 -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.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_LOW,T_DKIM_INVALID autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=date:from:to:subject:message-id :mime-version:content-type; s=mesmtp; bh=0PLfmOVR9/EtVL6b6vCrYqO YMqM=; b=LYiy86pXM8qsHXsnmrrI3IaUxyTAv8uQTMlzA2YaDcVW7tPloA17bVF KHnXjzJNLrsDHq5Wz1qoqcdEVfGbpzfZ0QDMFZuPhEQLkKcmkAuUXJoHBDHzlWHM jsBMll+QjgXk6h9FC/7QLOTZIaFp/0gdd8JZEZRM6xCwW3gXNOWE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=date:from:to:subject:message-id :mime-version:content-type; s=smtpout; bh=0PLfmOVR9/EtVL6b6vCrYq OYMqM=; b=R2IrwXIagN2lx8PfIRCGShDaARmillTEdAQpQMQa8w3MCAVag8SPM/ EiHOHNtRPOT/9++L+ubzO4eGGvXiKTTmus3p9fG14ch5BIqE8lI2crBV3aWCYc6X SmyCF3T+QOFIe61bXUJ4lzDduFTMdfwrneZMmw1w4K3qxpqAg71fU= X-Sasl-enc: E2IWY0j9FearQgIq1v6tev+QfP0r+S3ndE/QOPGwCeyxt+ozzEFiJ4SLt67Skw 1333526335 Date: Wed, 4 Apr 2012 10:58:46 +0300 From: Daniel Shahaf To: zsh-users@zsh.org Subject: known hosts tab completion Message-ID: <20120404075846.GF19236@daniel3.local> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) (4.3.15, FreeBSD port. I already tried manpages and IRC.) In ~/.ssh/config I have three hosts: foo.tld foo-1.tld foo-2.tld At a new prompt, under 'zsh -f; autoload compinit; compinit', I type: ssh foo I get: ssh foo.tld What I want to do: complete to 'foo.tld' and move to the end of the input line, in order enter a command (e.g., 'ssh foo.tld ' in order to run 'ssh foo.tld date') I don't see how to do that. I see two workarounds: (a) press three times, to cycle through the completions once; (b) 'setopt MENU_COMPLETE' (but that loses me the ability to complete an unambiguous prefix (namely, 'cd ~/d' -> 'cd ~/do' when ~/docs and ~/dots exist), which is a deal breaker for me). As to possible solutions, I'd be happy with something that doesn't fill the ".tld" part to the right of the cursor, as then I could just type '.' to get what I want (with the trailing space, even). Pointers, please?