[LXD 4.7] Autocompletion on ubuntu 20.04

Hello.

I have a fresh install of ubuntu 20.04 with an install of LXD from snap but which doesn’t provide LXD / LXC autocomplete. Unlike to my previous experience with LXD on fedora using snap and LXD where I found the autocompletion file in /var/lib/snapd/snap/lxd/current/etc/bash_completion.d/ snap.lxd.lxc I don’t found this file on ubuntu. On this ubuntu focal, it’s a taller version of Snappy and some internal changes seems to appear there.

How do I get LXD autocomplete on this ubuntu 20.04?

Hi!

In Ubuntu it should be here (LXD 4.7),

$ ls -l /etc/bash_completion.d/lxc 
lrwxrwxrwx 1 root root 52 Nov   9  2018 /etc/bash_completion.d/lxc -> /snap/lxd/current/etc/bash_completion.d/snap.lxd.lxc
$ 

If you do not have this link, then it could be a packaging issue.

Yes. The symlink is missing in my case.
Thank you for this nice answer :wink: :+1: