Автодополнение Bash работает, но я не могу понять почему. Кажется, настроено не так, как обычно

Автодополнение Bash работает, но я не могу понять почему. Кажется, настроено не так, как обычно

Я только что установил протестированный образ Raspberry Pi Debian на свой rpi3 (https://raspi.debian.net/tested-images/изображение arm64).

Когда я вхожу в систему через ssh как root, автодополнение bash, похоже, работает из коробки. Пока все хорошо. Но я не могу понять, почему оно работает.

Я посмотрел на типичные места:

меньше ~/.bashrc

# ~/.bashrc: executed by bash(1) for non-login shells.
# Note: PS1 and umask are already set in /etc/profile. You should not
# need this unless you want different defaults for root.
# PS1='${debian_chroot:+($debian_chroot)}\h:\w\$ '
# umask 022

# You may uncomment the following lines if you want `ls' to be colorized:
# export LS_OPTIONS='--color=auto'
# eval "$(dircolors)"
# alias ls='ls $LS_OPTIONS'
# alias ll='ls $LS_OPTIONS -l'
# alias l='ls $LS_OPTIONS -lA'
#
# Some more alias to avoid making mistakes:
# alias rm='rm -i'
# alias cp='cp -i'
# alias mv='mv -i'

меньше ~/.profile

if [ "$BASH" ]; then\
          if [ -f ~/.bashrc ]; then\
            . ~/.bashrc\
          fi\
        fi

меньше /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 [ "$(id -u)" -eq 0 ]; then
          PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
        else
          PATH="/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games"
        fi
        export PATH
        
        if [ "${PS1-}" ]; then
          if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
            # The file bash.bashrc already sets the default PS1.
            # PS1='\h:\w\$ '
            if [ -f /etc/bash.bashrc ]; then
              . /etc/bash.bashrc
            fi
          else
            if [ "$(id -u)" -eq 0 ]; then
              PS1='# '
            else
              PS1='$ '
            fi
          fi
        fi
        
        if [ -d /etc/profile.d ]; then
          for i in /etc/profile.d/*.sh; do
            if [ -r $i ]; then
              . $i
            fi
          done
          unset i
        fi

/etc/bash/bash.bashrc(только отрывок)

# enable bash completion in interactive shells
#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

/etc/profile.d

empty

ядро 5.10.0 arm64
bash 5.1.4

Вопросы:

  1. Где настраивается автодополнение bash?
  2. Может быть, достаточно просто установить пакет bash-completion в этой версии bash?

Связанный контент