[CentOS] tabs ignored in here document

Fri May 5 21:11:51 UTC 2017
Robbert Eggermont <R.Eggermont at tudelft.nl>

It's certainly possible to include tabs in here documents, in shell 
scripts it works as expected.

However, when you input the here document on the command line in an 
interactive shell, the moment you enter the tab it immediately triggers 
Bash' programmable completion and the tab never reaches the here document.

To disable programmable completion (temporarily), run:
bind 'set disable-completion on'
To (re-)enable programmable completion, run:
bind 'set disable-completion off'


On 05-05-17 20:16, Robert Moskowitz wrote:
> I thought this worked.  Many web pages tell you it works.  But bash is 
> ignoring tabs in my here docs.  Worst, where there are two tabs, it is 
> functioning as a command expand in bash, where all files in the current 
> directory are listed to complete the command.
> The following is the here doc I am using.  Most likely the tabs will be 
> converted to spaces in this email.  But the bottom line is, that while 
> processing all the double tables, all the files in the current directory 
> get listed, and the resultant file is all flush left, as if I had used 
> the +EOF option:
> Thing is, I thought I tested this previously, so it is possible that 
> there is now something wrong in my environment causing the problem?
> cat <<EOF>00-init.conf || exit 1
> ServerAdmin $admin_email
> ServerName $your_host_tld
> <VirtualHost *:80>
>      <Directory "/var/www/html">
>          Options Indexes FollowSymLinks
>          AllowOverride None
>          Require all grantedve sh
>      </Directory>
> </VirtualHost>
> <VirtualHost *:443>
>      SSLEngine On
>      SSLCertificateFile /etc/pki/tls/certs/$your_host_tld.crt
>      SSLCertificateKeyFile /etc/pki/tls/private/$your_host_tld.key
>      <Directory "/var/www/html">
>          Options Indexes FollowSymLinks
>          AllowOverride None
>          Require all granted
>      </Directory>
> </VirtualHost>
> thanks
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos