Blog atrasado con gajes del oficio

Error Bash Completion No Such File or Directory

I wouldn’t know where to look —- I certainly can browse the repo from Debian reposotiry — or where bash completion is usually installed on Debian-based distributions. It’s been a while since I have used these kind of systems. But after all, this is irrelevant. Even as popular as this distro may be, not everyone uses it.

A quick glance at the files that comprise this program, one could see that aside from the usr folder, bash completion is also installed under etc and bin accordingly.

Bash completion allows to fill in the rest of the commands or variables that follow for given executable.

See Bash autocompletion for more details about its chock features’ versatility.

In the case of Arch, the installation does not create — unlike on Debian — the folder bash_completion under etc. And I don’t think this may have been an oversight from the Arch team, but presumably and perhaps due to safety reasons, this was something that was never considered in the first place.

Other programs have had no issue by correctly including on the script the means to have it install appropriately. But it’s my opinion — and anyone is more than welcome to disagree with me here — that many a great number of programs have not chosen to do so or failed altogether in this regard. Hugo for example is one of them. See for example the destination directory when this feature was added. See the commit here.

To resolve this issue, the most viable solution is to manually add the folder, from whence this error stems, or else the messageError: bash_completion.d: hugo.sh no such file or directory will disallow the autocomplete which was added to the binaries of this program, to come into effect.