In order for bash completion to be available right after login
we need to make sure the corresponding package is installed and,
for FreeBSD only, the enviroment script gets sourced.
Signed-off-by: Andrea Bolognani <abologna(a)redhat.com>
---
guests/templates/bashrc | 5 +++++
guests/vars/projects/base.yml | 1 +
guests/vars/projects/libvirt.yml | 1 -
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/guests/templates/bashrc b/guests/templates/bashrc
index 639a961..e925cd9 100644
--- a/guests/templates/bashrc
+++ b/guests/templates/bashrc
@@ -14,3 +14,8 @@ export PYTHONPATH="{{ PYTHONPATH }}"
which python3 >/dev/null 2>&1 && export PYTHON="python3" ||
export PYTHON="python2"
which gmake >/dev/null 2>&1 && export MAKE="gmake" || export
MAKE="make"
which ccache >/dev/null 2>&1 && export CC="ccache cc"
+
+# Enable bash completion. Only needed on FreeBSD, the system-wide
+# shell profile will take care of it for us everywhere else
+bash_completion=/usr/local/share/bash-completion/bash_completion.sh
+test -f "$bash_completion" && . "$bash_completion"
diff --git a/guests/vars/projects/base.yml b/guests/vars/projects/base.yml
index a0483d8..49d4d2e 100644
--- a/guests/vars/projects/base.yml
+++ b/guests/vars/projects/base.yml
@@ -4,6 +4,7 @@ packages:
- automake
- autopoint
- bash
+ - bash-completion
- ccache
- chrony
- cppi
diff --git a/guests/vars/projects/libvirt.yml b/guests/vars/projects/libvirt.yml
index 9f027f8..598dfc4 100644
--- a/guests/vars/projects/libvirt.yml
+++ b/guests/vars/projects/libvirt.yml
@@ -3,7 +3,6 @@ packages:
- apparmor
- augeas
- avahi
- - bash-completion
- cyrus-sasl
- device-mapper
- dnsmasq
--
2.14.3