From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Phil Hagelberg Newsgroups: gmane.emacs.devel Subject: Re: 23.0.50; pcmpl-ssh-hosts breaks when known_hosts file has a space in the wrong place Date: Wed, 09 Apr 2008 09:28:51 -0700 Message-ID: <87hcebngak.fsf@hagelb.org> References: <8763viza9c.fsf@hagelb.org> <87iqzgx77t.fsf@hagelb.org> <18408.3798.278043.611553@fencepost.gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1207758567 10797 80.91.229.12 (9 Apr 2008 16:29:27 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 9 Apr 2008 16:29:27 +0000 (UTC) Cc: Emacs developers To: Glenn Morris Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 09 18:29:57 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JjdBB-000747-3M for ged-emacs-devel@m.gmane.org; Wed, 09 Apr 2008 18:29:45 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjdAX-0007ty-IJ for ged-emacs-devel@m.gmane.org; Wed, 09 Apr 2008 12:29:05 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JjdAT-0007tj-Au for emacs-devel@gnu.org; Wed, 09 Apr 2008 12:29:01 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JjdAR-0007tJ-T8 for emacs-devel@gnu.org; Wed, 09 Apr 2008 12:29:01 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JjdAR-0007tG-Lr for emacs-devel@gnu.org; Wed, 09 Apr 2008 12:28:59 -0400 Original-Received: from sd-green-bigip-74.dreamhost.com ([208.97.132.74] helo=spunkymail-a13.g.dreamhost.com) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JjdAN-0004QJ-OV; Wed, 09 Apr 2008 12:28:55 -0400 Original-Received: from dynabook (dsl081-164-175.sea1.dsl.speakeasy.net [64.81.164.175]) by spunkymail-a13.g.dreamhost.com (Postfix) with ESMTP id BF0F0129B3C; Wed, 9 Apr 2008 09:28:53 -0700 (PDT) In-Reply-To: <18408.3798.278043.611553@fencepost.gnu.org> (Glenn Morris's message of "Mon, 24 Mar 2008 16:28:06 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:94797 Archived-At: Sorry, I lost this email for a while when I was switching machines. Glenn Morris writes: > I quote from `man sshd' on my RHEL5 system: > > SSH_KNOWN_HOSTS FILE FORMAT > > ... > > Each line in these files contains the following fields: hostnames, > bits, exponent, modulus, comment. The fields are separated by spaces. > > Hostnames is a comma-separated list of patterns... > > This is "OpenSSH_4.3p2, OpenSSL 0.9.8b 04 May 2006". > My own known_hosts file contains many entries like this: > > host1.full.domain,host1,host1-alias,host-generic,ip1 ssh-rsa ... > host2.full.domain,host2,host2-alias,host-generic,ip2 ssh-rsa ... Interesting. I have never seen a file like this in practice, but I have not used Red Hat in a long time. Thanks for bringing this to my attention. Recently it's come to my attention that there's already a function that does this in tramp: tramp-parse-hosts will return a list of user/host pairs, though on my machine it also returns some key signatures. (I imagine it could use some debugging as well.) Clearly this shows some redundancy that should be removed. But I'm not sure what the best way to go about this is. I don't think pcomplete should require tramp, nor vice-versa. Perhaps it should be spun out into a third file that the other two require? I don't feel I have a great grasp on how files are organized within Emacs. Thoughts? -Phil http://technomancy.us