/usr/share/bash-completion/completions/lxc and /usr/share/bash-completion/completions/lxd.lxc symlink is installed, and bash did tries to invoke /snap/snapd/current/usr/lib/snapd/complete.sh, but nothing happens.
I need to install /snap/lxd/current/etc/bash_completion.d/snap.lxd.lxc symlink manually under /etc/bash_completion.d
Happens both on 5.2 and 5.3 snap packages.
alvin@alvin-WS-E500:~$ lxc con+ local etel=snap/core/current/usr/lib/snapd/etelpmoc.sh
++ command -v lxc
+ [[ /snap/bin/lxc =~ ^(/var/lib/snapd)?/snap/bin/ ]]
+ [[ -e /var/lib/snapd/snap/core/current/usr/lib/snapd/etelpmoc.sh ]]
+ [[ -e /snap/core/current/usr/lib/snapd/etelpmoc.sh ]]
+ _completion_loader lxc
+ local cmd=lxc
+ __load_completion lxc
+ dirs=('/home/alvin/.local/share/bash-completion/completions')
+ local -a dirs
+ local 'ifs=
' IFS=: dir cmd=lxc compfile
+ [[ -n lxc ]]
+ for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}
+ dirs+=($dir/bash-completion/completions)
+ for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}
+ dirs+=($dir/bash-completion/completions)
+ for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}
+ dirs+=($dir/bash-completion/completions)
+ for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}
+ dirs+=($dir/bash-completion/completions)
+ for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}
+ dirs+=($dir/bash-completion/completions)
+ IFS='
'
+ [[ /usr/share/bash-completion/bash_completion == */* ]]
+ dirs+=("${BASH_SOURCE%/*}/completions")
+ local backslash=
+ [[ lxc == \\* ]]
+ for dir in "${dirs[@]}"
+ [[ -d /home/alvin/.local/share/bash-completion/completions ]]
+ continue
+ for dir in "${dirs[@]}"
+ [[ -d /usr/share/ubuntu-xorg/bash-completion/completions ]]
+ continue
+ for dir in "${dirs[@]}"
+ [[ -d /usr/share/gnome/bash-completion/completions ]]
+ continue
+ for dir in "${dirs[@]}"
+ [[ -d /usr/local/share//bash-completion/completions ]]
+ continue
+ for dir in "${dirs[@]}"
+ [[ -d /usr/share//bash-completion/completions ]]
+ for compfile in "$cmd" "$cmd.bash" "_$cmd"
+ compfile=/usr/share//bash-completion/completions/lxc
+ [[ -f /usr/share//bash-completion/completions/lxc ]]
+ . /usr/share//bash-completion/completions/lxc
+ [[ -n '' ]]
+ return 0
+ return 124