Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 305257 - bash-completion ssh -bash: _known_hosts_real: command not found
Summary: bash-completion ssh -bash: _known_hosts_real: command not found
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-15 14:21 UTC by Krzysiek Bielicki
Modified: 2010-10-13 13:21 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Krzysiek Bielicki 2010-02-15 14:21:01 UTC
Bash completion for ssh in not working.
After installing app-shells/bash-completion and eselect bashcomp enable ssh, ssh <tab> prints "-bash: _known_hosts_real: command not found" instead of printing known hosts suggestions.
Comment 1 Doktor Notor 2010-02-16 02:23:13 UTC
Run `. /etc/profile.d/bash-completion.sh` or launch a new shell.
Comment 2 Krzysiek Bielicki 2010-02-16 12:30:03 UTC
Generally bash completion is working (ex. for emerge) so bash-completion is initialized.

_known_hosts_real is called only from bash_completion.d/ssh so bashcomp scripts are executed as they should, but _known_hosts_real function/executable does not exist.
Comment 3 Nick Loeve 2010-02-16 13:44:49 UTC
I can confirm that bashcomp is generally working, but the the issue with ssh host completion
Comment 4 Doktor Notor 2010-02-17 08:17:37 UTC
(In reply to comment #2)
> Generally bash completion is working (ex. for emerge) so bash-completion is
> initialized.
 
> _known_hosts_real is called only from bash_completion.d/ssh so bashcomp scripts
> are executed as they should, but _known_hosts_real function/executable does not
> exist.

Well, it works perfectly fine here w/ app-shells/bash-completion-1.1-r5:

$ ssh <TAB><TAB>
::1          alfa         gw           localhost    notorcomp    printserver  

_known_hosts_real exists in /etc/bash_completion.d/base
 
Comment 5 Danny Robson 2010-02-18 01:54:00 UTC
I've been having this problem for some time. Enabling the `base' bash_completion module brings in the _known_hosts_real function (and the /etc/bash_completion.d/base file), which fixed it for me.

Try the following,
`eselect bashcomp enable --global base'
Comment 6 Nick Loeve 2010-02-22 10:18:55 UTC
Yep, enabling base fixes the issue!
Comment 7 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-02-27 21:10:44 UTC
almost everything needs base, glad you resolved the issue
Comment 8 Adrian 2010-10-13 11:57:13 UTC
This is not a good solution. Enabling 'base' causes e.g. ~username completion to fail in lots of cases, e.g. tab-completing the username in 'cd ~someuser'
Comment 9 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2010-10-13 13:19:52 UTC
(In reply to comment #8)
> This is not a good solution. Enabling 'base' causes e.g. ~username completion
> to fail in lots of cases, e.g. tab-completing the username in 'cd ~someuser'
> 

cd ~userna<tab> completes to /home/username/
Comment 10 Adrian 2010-10-13 13:21:55 UTC
As soon as I enable the 'base' bashcomp it stops working.