Sign up ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

I have a script for auto-completing my ssh-hosts. If I change my ~/.ssh/config the auto-completion is not updated automatically, though. This does not surprise me. In a new shell, the new entry is picked up and usable, of course.

How do I manually trigger a refresh of the completion in bash?

share|improve this question

2 Answers 2

up vote 5 down vote accepted

Try doing this :

exec bash

this will do the trick...

share|improve this answer
neat, that replaces the current shell... In a way, that like opening a new shell, but still nice. –  kronn Oct 19 '12 at 17:36

See reload bash completion functions file

. /etc/bash_completion.d/filename

(adapt /etc depending on where your bash_completion scripts are deployed, replace filename by the appropriate script)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.