andrewholgate / docker-drupal-php70

A base docker image using PHP 7.0 and HTTP/2 on Ubuntu 14.04 for Drupal 8 projects.
3 stars 2 forks source link

Allow for bash completion #7

Closed andrewholgate closed 8 years ago

andrewholgate commented 8 years ago

As flagged by @matthewmorek, working in bash would be facilitated by having bash completion installed.

Eg. typing serv[tab] php[tab] res[tab] should complete to service php7.0-fpm restart

The following needs to be added to the container.

apt-get install bash-completion

Uncomment the following in /etc/bash.bashrc:

if ! shopt -oq posix; then
 if [ -f /usr/share/bash-completion/bash_completion ]; then
   . /usr/share/bash-completion/bash_completion
 elif [ -f /etc/bash_completion ]; then
   . /etc/bash_completion
 fi
fi