http://wiki.ubuntu.cz/Lehk%C3%BD%20%C3%BAvod%20do%20taj%C5%AF%20p%C5%99%C3%ADkazov%C3%A9%20%C5%99%C3%A1dky#Bash_completionJe to v souboru /.bashrc
# enable bash completion in interactive shellsif [ -f /etc/bash_completion ]; then . /etc/bash_completionfi
# enable programmable completion features (you don't need to enable# this, if it's already enabled in /etc/bash.bashrc and /etc/profile# sources /etc/bash.bashrc).#if [ -f /etc/bash_completion ]; then# . /etc/bash_completion#fi
ged@ged-laptop:~$ cat .xsession-errors.old /etc/gdm/Xsession: Beginning session setup.../etc/bash_completion: 32: [[: not found/etc/bash_completion: 38: [[: not found/etc/bash_completion: 50: Bad substitution
Ano "/root/.bashrc" a to platí i pro "sudo -i".
ged@ged-laptop:~$ cat /root/.bashrccat: /root/.bashrc: Permission deniedged@ged-laptop:~$ sudo cat /root/.bashrc[sudo] password for ged: ....# enable programmable completion features (you don't need to enable# this, if it's already enabled in /etc/bash.bashrc and /etc/profile# sources /etc/bash.bashrc).if [ -f /etc/bash_completion ]; then . /etc/bash_completionfi
ged@ged-laptop:~$ sudo cat /etc/profile# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...).if [ -d /etc/profile.d ]; then for i in /etc/profile.d/*.sh; do if [ -r $i ]; then . $i fi done unset ifiif [ "$PS1" ]; then if [ "$BASH" ]; then PS1='\u@\h:\w\$ ' if [ -f /etc/bash.bashrc ]; then . /etc/bash.bashrc fi else if [ "`id -u`" -eq 0 ]; then PS1='# ' else PS1='$ ' fi fifiumask 022
ged@ged-laptop:~$ sudo cat /etc/bash.bashrc..# enable bash completion in interactive shellsif [ -f /etc/bash_completion ]; then . /etc/bash_completionfi