From a893db03d1611a2da7007421a64ae6ea531fc632 Mon Sep 17 00:00:00 2001 From: David Paleino Date: Sat, 1 Nov 2008 12:32:22 +0100 Subject: [PATCH] Allow `Host(Name)' in ssh config file to have trailing comment. --- bash_completion | 2 +- debian/changelog | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bash_completion b/bash_completion index 148899c6..a646bc02 100644 --- a/bash_completion +++ b/bash_completion @@ -2637,7 +2637,7 @@ _known_hosts() fi # append any available aliases from config files if [ ${#config[@]} -gt 0 ] && [ -n "$aliases" ]; then - local host_aliases=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\?['"$'\t '"']\+\([^*?]*\)$/\2/p' "${config[@]}" ) + local host_aliases=$( sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\?['"$'\t '"']\+\([^#*?]*\)\(#.*\)\?$/\2/p' "${config[@]}" ) hosts=$( compgen -W "$host_aliases" -- $ocur ) COMPREPLY=( "${COMPREPLY[@]}" $hosts ) fi diff --git a/debian/changelog b/debian/changelog index c19cc821..407ccf0d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -35,9 +35,10 @@ bash-completion (200809xx) UNRELEASED; urgency=low * Added support for `-F configfile' to _known_hosts(), ssh, scp and sftp, thanks to Freddy Vulto (Closes: #504141) * Allow `Host(Name)' in ssh config file to be indented + * Allow `Host(Name)' in ssh config file to have trailing comment. * debian/links fixed (Closes: #494292) - -- David Paleino Sat, 01 Nov 2008 12:29:14 +0100 + -- David Paleino Sat, 01 Nov 2008 12:31:56 +0100 bash-completion (20080705) unstable; urgency=low