diff options
| author | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-05 00:38:37 +0200 |
|---|---|---|
| committer | Ville Skyttä <ville.skytta@iki.fi> | 2011-11-05 00:38:37 +0200 |
| commit | b54d3f022f73553bdec64e1da29736d41835a029 (patch) | |
| tree | 68079d50cff51dddcdcae419365ae714a0008308 /bash_completion | |
| parent | 55ec6a079b0a66eca2e4ed56f0757fc7c4ce34a5 (diff) | |
| download | bash-completion-b54d3f022f73553bdec64e1da29736d41835a029.tar.gz | |
_known_hosts_real: Discard @markers at beginning of line.
Diffstat (limited to 'bash_completion')
| -rw-r--r-- | bash_completion | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/bash_completion b/bash_completion index 637ca69a..8c8fab59 100644 --- a/bash_completion +++ b/bash_completion @@ -1414,8 +1414,10 @@ _known_hosts_real() if [ ${#kh[@]} -gt 0 ]; then # FS needs to look for a comma separated list COMPREPLY+=( $( awk 'BEGIN {FS=","} - /^\s*[^|\#]/ {for (i=1; i<=2; ++i) { \ - sub(" .*$", "", $i); \ + /^\s*[^|\#]/ { + sub("^@[^ ]+ +", ""); \ + sub(" .*$", ""); \ + for (i=1; i<=2; ++i) { \ sub("^\\[", "", $i); sub("\\](:[0-9]+)?$", "", $i); \ if ($i ~ /'"$awkcur"'/) {print $i} \ }}' "${kh[@]}" 2>/dev/null ) ) |
