Debian Bug report logs - #535585
ssh: only sees foo in 'Host foo bar baz' in .ssh/config

version graph

Package: bash-completion; Maintainer for bash-completion is Gabriel F. T. Gomes <gabriel@debian.org>; Source for bash-completion is src:bash-completion (PTS, buildd, popcon).

Reported by: "Trent W. Buck" <trentbuck@gmail.com>

Date: Fri, 3 Jul 2009 13:15:01 UTC

Severity: minor

Tags: confirmed, fixed-upstream

Found in version bash-completion/1:1.0-3

Fixed in version bash-completion/1:1.1-1

Done: David Paleino <d.paleino@gmail.com>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#535585; Package bash-completion. (Fri, 03 Jul 2009 13:15:04 GMT) (full text, mbox, link).


Acknowledgement sent to "Trent W. Buck" <trentbuck@gmail.com>:
New Bug report received and forwarded. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Fri, 03 Jul 2009 13:15:04 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: "Trent W. Buck" <trentbuck@gmail.com>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: ssh: only sees foo in 'Host foo bar baz' in .ssh/config
Date: Fri, 03 Jul 2009 23:11:50 +1000
Package: bash-completion
Version: 1:1.0-3
Severity: minor

It seems that "ssh ba[TAB]" will try to complete "ba" as a hostname,
using ~/.ssh/config as one source of names.  The file ~/.ssh/config is
described by the ssh_config(5) manpage, and in addition to the simple
Host pattern, e.g.

    Host foo.example.net
      Port 443

you can have multiple patterns

    Host foo.example.net bar.example.net
      Port 443

AFAICT bash-completion only "sees" the first one.  I'd like it to
complete all of them.  Bonus points will be awarded if you can work
out an intelligent way to handle globbing patterns, e.g.

    Host *.example.net *.example.com
      Port 443

I had a look at /etc/bash_completion.d/ssh, but it was written in such
an abstract way that I think I'd have to understand large parts of the
main /etc/bash_completion script in order to solve this myself.

-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.29-1-686 (SMP w/1 CPU core)
Locale: LANG=en_AU.utf8, LC_CTYPE=en_AU.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages bash-completion depends on:
ii  bash                          4.0-3      The GNU Bourne Again SHell

bash-completion recommends no packages.

bash-completion suggests no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>:
Bug#535585; Package bash-completion. (Tue, 07 Jul 2009 22:24:11 GMT) (full text, mbox, link).


Acknowledgement sent to Freddy Vulto <fvulto@gmail.com>:
Extra info received and forwarded to list. Copy sent to Bash Completion Maintainers <bash-completion-devel@lists.alioth.debian.org>. (Tue, 07 Jul 2009 22:24:11 GMT) (full text, mbox, link).


Message #10 received at 535585@bugs.debian.org (full text, mbox, reply):

From: Freddy Vulto <fvulto@gmail.com>
To: "Trent W. Buck" <trentbuck@gmail.com>, 535585@bugs.debian.org
Cc: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: Re: [Bash-completion-devel] Bug#535585: ssh: only sees foo in 'Host foo bar baz' in .ssh/config
Date: Wed, 8 Jul 2009 00:09:26 +0200
On Fri, Jul 3, 2009 at 3:11 PM, Trent W. Buck<trentbuck@gmail.com> wrote:
> you can have multiple patterns
>
>    Host foo.example.net bar.example.net
>      Port 443
>
> AFAICT bash-completion only "sees" the first one.  I'd like it to
> complete all of them.  Bonus points will be awarded if you can work
> out an intelligent way to handle globbing patterns, e.g.
>
>    Host *.example.net *.example.com
>      Port 443

Fixed in git commit 3fe193f81a3e.  I'll leave the bonus points for now...

Within _known_hosts_real, IFS was set to just newline (\n), whereas
`compgen -W' relies on IFS being space-tab-newline ( \t\n) to expand
hostnames which are separated by whitespace.

Thanks for reporting,

Freddy Vulto
http://fvue.nl




Added tag(s) confirmed, pending, and fixed-upstream. Request was from David Paleino <d.paleino@gmail.com> to control@bugs.debian.org. (Wed, 16 Sep 2009 12:27:03 GMT) (full text, mbox, link).


Reply sent to David Paleino <d.paleino@gmail.com>:
You have taken responsibility. (Sat, 10 Oct 2009 17:06:27 GMT) (full text, mbox, link).


Notification sent to "Trent W. Buck" <trentbuck@gmail.com>:
Bug acknowledged by developer. (Sat, 10 Oct 2009 17:06:27 GMT) (full text, mbox, link).


Message #17 received at 535585-close@bugs.debian.org (full text, mbox, reply):

From: David Paleino <d.paleino@gmail.com>
To: 535585-close@bugs.debian.org
Subject: Bug#535585: fixed in bash-completion 1:1.1-1
Date: Sat, 10 Oct 2009 16:47:18 +0000
Source: bash-completion
Source-Version: 1:1.1-1

We believe that the bug you reported is fixed in the latest version of
bash-completion, which is due to be installed in the Debian FTP archive:

bash-completion_1.1-1.diff.gz
  to pool/main/b/bash-completion/bash-completion_1.1-1.diff.gz
bash-completion_1.1-1.dsc
  to pool/main/b/bash-completion/bash-completion_1.1-1.dsc
bash-completion_1.1-1_all.deb
  to pool/main/b/bash-completion/bash-completion_1.1-1_all.deb
bash-completion_1.1.orig.tar.gz
  to pool/main/b/bash-completion/bash-completion_1.1.orig.tar.gz



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 535585@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
David Paleino <d.paleino@gmail.com> (supplier of updated bash-completion package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sat, 10 Oct 2009 18:11:00 +0200
Source: bash-completion
Binary: bash-completion
Architecture: source all
Version: 1:1.1-1
Distribution: unstable
Urgency: low
Maintainer: d.paleino@gmail.com
Changed-By: David Paleino <d.paleino@gmail.com>
Description: 
 bash-completion - programmable completion for the bash shell
Closes: 504213 518561 524190 524961 531337 531343 534901 535105 535585 540033 544024 545743 545978 547550
Changes: 
 bash-completion (1:1.1-1) unstable; urgency=low
 .
   * New upstream release
     - fix svk completion using $filenames instead of $default
       (Closes: #524961)
     - fix typo in .ass subtitles completion for mplayer
       (Closes: #531337)
     - fix regression on man(1) completion: also complete on local .3pm
       files (Closes: #531343)
     - added avahi-discovered hosts to _known_hosts_real()
       (Closes: #518561)
     - added m4v completion to mplayer (Closes: #504213)
     - improve qemu completion (Closes: #534901)
     - added sshfs completion (shares the same as scp) (Closes: #545978)
     - added --no-generate to "apt-cache pkgnames" calls, make it faster
       on certain configurations (Closes: #547550)
     - add *.ogv to xine-based players (Closes: #540033)
     - fix sbcl file/dirname completion (Closes: #545743)
     - fix _quote_readline on bash 4 (Closes: #544024)
     - patched _known_hosts() to support multiple
       {Global,User}KnownHosts in SSH config files, thanks to Thomas
       Nilsson (Closes: #524190)
     - fix completing multiple hosts (Closes: #535585)
   * debian/extra/bash-completion.pm moved to bash_completion.pm
     (Closes: #535105)
   * debian/patches/ removed, merged upstream
   * debian/rules:
     - passing debian/CHANGES to dh_installchangelogs, it's missing from
       upstream tarball :(
     - rewritten using dh7
   * debian/control:
     - debhelper Build-Dependency bumped to >= 7.0.50
     - removed quilt Build-Dependency, no more used
     - added ${misc:Depends} dependency
     - Standards-Version bumped to 3.8.3, no changes needed
   * debian/compat bumped to 7
   * debian/docs added
   * debian/install updated, using upstream buildsystem
Checksums-Sha1: 
 a489a8bf5170f225b095bceb87799f23828fe2bf 1317 bash-completion_1.1-1.dsc
 0e666ebda3d577571ab62bcecc16e1024922cd18 163598 bash-completion_1.1.orig.tar.gz
 7ab79801fa680b8c7855f30a160c06b78e4dc710 15493 bash-completion_1.1-1.diff.gz
 b6cbe3b49e729bcd77c2a11e24af62ebb3f73d70 126996 bash-completion_1.1-1_all.deb
Checksums-Sha256: 
 055ac8a7cf5eb335a871017b63031946a127c3f7ef2c869a72dbf996a2dda047 1317 bash-completion_1.1-1.dsc
 53369b32493b58c3d0d7d45630c329faa3ca209ed6e7a6c5392a19e67904721b 163598 bash-completion_1.1.orig.tar.gz
 7911adcce7ce05951186bd4d875e5e1527d870ae9fc7e91f663fb58c2778adce 15493 bash-completion_1.1-1.diff.gz
 acfe70a65d6a162677c0de8e6711f49510d8916e5058e1e2bca1259ec3b8cc19 126996 bash-completion_1.1-1_all.deb
Files: 
 4443a225e5af2f644f7457aac8c8c7ed 1317 shells standard bash-completion_1.1-1.dsc
 593d3edcf287b9e9d735049bd4d3f229 163598 shells standard bash-completion_1.1.orig.tar.gz
 8c259b4cf3747a0029acf4bca140be91 15493 shells standard bash-completion_1.1-1.diff.gz
 f41ce223bce595a8a3324ff8a9579e16 126996 shells standard bash-completion_1.1-1_all.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkrQsvwACgkQ5qqQFxOSsXQBOQCfZnO7RvncKmbvQDed4izHoCZO
v80AnRsQyOCYzq4zJgKnSqZbfMS55Mmd
=Lf6B
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Thu, 26 Nov 2009 07:32:46 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 09:33:32 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.