From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.3 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 16908 invoked from network); 10 Dec 2022 12:01:49 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 10 Dec 2022 12:01:49 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1670673709; b=P9zH8Q9PFompGx3lro/njw6/cIo+7o/Ted3SYvCXMdwwT1A9Nm/Fg8vAtQG9HAy/pAOYesqKH5 pT/ooSWFWLKps8EOs5c9BaWm5QxGtebT85lePqoKj6uPavKOF/cHsKkzVhOsAjXexUZyS3pxyz V4B0X51R1p/TWvJi0xWt6JIcsKM24SmZcQdSy/0VEXswqQgvBpK40fIk05mNhw+jBW1gPygBPn CC1tAqxfQCms4WEHHk0JxKZIvLp6eiD63pfLflfeG6nL+HPHQ6xvBKyIuq2LToALpQn46T+sXt Sx9/IA3I2RjJxfMEMIm/9Sr3sPeT6VmrU7eXldeOOK1TUw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1670673709; bh=rzmS8VGGqGG5NA4LVKpvULzva5ZYyZL15fXcrRhdULw=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:In-Reply-To:Content-Transfer-Encoding:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:DKIM-Signature: DKIM-Signature:DKIM-Signature; b=NCJjbMYhjuhOrxqpvyRjRkebh6sTBFAa3NybtnhEYwp5HfjlVaq9arhkZdnlG6BIjJozPotGnW uEOFQlHaQKPECjPbHs+da9bCJRtCWoBpUa126mnRlwB/4rXU8NAlNSZmvvQMiP6wGmoQxPHxLi v39URfuMYaR7nL4+2LY69otbgUlR0ZyMkZamQTJ5pm4RPLKO/EQZJqLq+/7fm1Bz66TQ9kHzNo cD9184k3Cy3VIdggW0NeU/VQWaoj30XTaI/Hrio9haVLJ7fahTCQZ1nZijAF8T+ZmBVtP23Yci gIS21QW1C8S+31Q04cB/nEtCHPhHtEKZJxD467A2XpYAEA==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID; bh=OYNCat5eJsX/gNOMf7aMJTEN0gVuei6Pe9SJUrr+SzE=; b=dNwvQuGKmzTEEbqesslqvzBwMr RGKHTW3r+NXzxb6P59TFKHtwLLGcdwEBg8PjO7Jom9V/60DcadZ/BekHG9KXm2IFDtEFjQ3o1+aNv OQ7c6D6TJzcHlJwlur7wEkBtEgGXyAObUx69O4gezHAsPXBqDs0r51hDCi8IZVWYXixyLaT5LEQXn Dbeny4M59XAs+e7NKTku8Kz/P1cDnyjnwTSux6/zTBgnbiwxzWSJm4BvdhoI6ThkUzCbff9PSB02v 7rtZDuhJ7jp9Ev7shaETzx7Uj4uhibH6m0K+q0nAWWqJbziK2hR7+VrwFukvA8lXJj9OBr6PIcKl2 OSNS93aQ==; Received: by zero.zsh.org with local id 1p3yY8-000OmT-3w; Sat, 10 Dec 2022 12:01:48 +0000 Authentication-Results: zsh.org; iprev=pass (out5-smtp.messagingengine.com) smtp.remote-ip=66.111.4.29; dkim=pass header.d=daniel.shahaf.name header.s=fm1 header.a=rsa-sha256; dkim=pass header.d=messagingengine.com header.s=fm2 header.a=rsa-sha256; dmarc=none header.from=daniel.shahaf.name; arc=none Received: from out5-smtp.messagingengine.com ([66.111.4.29]:50061) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1p3yXn-000OUm-In; Sat, 10 Dec 2022 12:01:29 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B2E055C0111; Sat, 10 Dec 2022 07:01:26 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Sat, 10 Dec 2022 07:01:26 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1670673686; x=1670760086; bh=OYNCat5eJs X/gNOMf7aMJTEN0gVuei6Pe9SJUrr+SzE=; b=UEFdwdGddOzwoAlzktVJ4x89nu Yjk+mEB/HzvxYvX2NpDpXDkISiDoNXz+fj3iIJkbA+zCw6C2ckCI6wAMMfA3KTdp g0+d98OT7zMLsEf85rvxziMrtZYspceL4phtR2xIfRSYoevl4rHDtkPI1gQUqUc1 0VR1O/S7gDpQAJsIH7BWDsAyjepx77KCflYVXuSFkjXWdE/hdy04G/+UvWd4CpSP LixjfpNQREKv7rlFB/Dyo9Ui88Akb+1wPpbpgVYd0mvUsov29PgkibxclbpHeYmh JfaG9X9A4pE31YcA+sFHJFdPT+LcSZes96hjv937J2Qa8237WmLJw5C8GP7Q== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1670673686; x= 1670760086; bh=OYNCat5eJsX/gNOMf7aMJTEN0gVuei6Pe9SJUrr+SzE=; b=k 6Zr1UG1cnrVRasY9x5aGvbcSHQBcXHSBLNVtELFKVgGWrMrPUQac9v8lqz5b7OFe Z/6IBZolOrL0gmzpzG7IUXZeAjuSJejy0fNr+c439obHd64RzFKHiklpCf+mldA1 VSagcKZFRreXUuNYiQbG1YMpPZRSCHAaHMO7wcS8sctg/RpGe9w6uL/0UjyR8YWf 6aAkzb04lZ8l81sEL5B77lulAB4H0xlCStpPTzVSiJpbI0I96GAKnB/nBui5SYDr DIg1y7AjwxlOg6MOQDoeUl9iWJPaE+3APfUnll1aZRLzczRrYIzRdM8d9urLRwZX c+gKR2q42VYegE/D3bRCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdeggdefgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvvefukfhfgggtugfgjggfsehtkedttddtredunecuhfhrohhmpeffrghn ihgvlhcuufhhrghhrghfuceougdrshesuggrnhhivghlrdhshhgrhhgrfhdrnhgrmhgvqe enucggtffrrghtthgvrhhnpeegiefgheejffekueeuteehiefhhfevkefftdevudeffeev leehvedtvdeiheduteenucffohhmrghinhepiihshhdrohhrghenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegurdhssegurghnihgvlhdrshhh rghhrghfrdhnrghmvg X-ME-Proxy: Feedback-ID: i425e4195:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sat, 10 Dec 2022 07:01:26 -0500 (EST) Received: by tarpaulin.shahaf.local2 (Postfix, from userid 1000) id 4NTmh44PnQz3BB; Sat, 10 Dec 2022 12:01:24 +0000 (UTC) Date: Sat, 10 Dec 2022 12:01:24 +0000 From: Daniel Shahaf To: Jan Palus Cc: zsh-workers@zsh.org Subject: Re: zsh does not offer ssh host from config Message-ID: <20221210120124.GY27622@tarpaulin.shahaf.local2> References: <20221209010650.sq2cp5a2op2mrpat@pine.grzadka> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20221209010650.sq2cp5a2op2mrpat@pine.grzadka> User-Agent: Mutt/1.10.1 (2018-07-13) X-Seq: 51170 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: , List-Subscribe: , List-Unsubscribe: , List-Post: List-Owner: List-Archive: Jan Palus wrote on Fri, Dec 09, 2022 at 02:06:50 +0100: > Hi, > > I've got a single real hostname starting with 'build' prefix which is present > in my known_hosts file. I also have a couple Host specifications in ssh config > file having names starting with 'build' but real HostName does not resolve to > name starting with 'build'. When doing `ssh build` I'd expect to be > offered both real hostname as well as Host specification names, however only > real hostname is immediately completed. That's because of _ssh_hosts returning > on successful hosts completion: > > # If users-hosts matches, we shouldn't complete anything else. > if [[ "$IPREFIX" == *@ ]]; then > _combination -s '[:@]' my-accounts users-hosts "users=${IPREFIX/@}" hosts "$@" && return > else > _combination -s '[:@]' my-accounts users-hosts \ > ${opt_args[-l]:+"users=${opt_args[-l]:q}"} hosts "$@" && return # <--- HERE > fi > > Is this intentional that config file parsing is skipped entirely if host was > completed successfully? That «return» was added in https://www.zsh.org/users/11333 with the intention of skipping config file parsing if a match was found /in the users-hosts style/. However, in a quick test with these fictional values: [[[ % zstyle -L \* users-hosts; echo $? 1 % tail -2 ~/.ssh/config Host completion-test1.zsh.org HostName 2001:db8::zsh % tail -1 ~/.ssh/known_hosts completion-test2.zsh.org,2001:db8::zsh x-not-a-real-identifier abcdef01 % ]]] I observe that «ssh completion» only offers completion-test2.zsh.org, not completion-test1.zsh.org. I take it both should be offered (since users-hosts is unset).