mscs icon indicating copy to clipboard operation
mscs copied to clipboard

install fails on /etc/bash_completion.d/mscs

Open icolwell opened this issue 5 months ago • 1 comments

I recently tried installing mscs on an Ubuntu 22 server. I got this error:

install -m 0755 msctl /usr/local/bin/msctl
install -m 0755 mscs /usr/local/bin/mscs
install -m 0644 mscs.completion /etc/bash_completion.d/mscs
install: cannot create regular file '/etc/bash_completion.d/mscs': No such file or directory
make: *** [Makefile:34: update] Error 1

I investigated and found that my server has no /etc/bash_completion.d directory even though the bash-completion apt package is installed. I found this stackexchange discussion saying that /etc/bash_completion.d/ is a legacy dir and bash completions should instead go into /usr/share/bash-completion/completions/.

I also looked in /usr/share/bash-completion/completions/ on my barebones Ubuntu 22 server and found it full of completion files, so it does seems like this is where the completion file should live.

I wonder though, is this something unique to Ubuntu? or do modern Debian releases and other linux distros also use /usr/share/bash-completion/completions/?

icolwell avatar Oct 11 '25 15:10 icolwell

I installed on a fresh Ubuntu 24.04 server installation and I had the /etc/bash_completion.d directory. But I do also have a couple other files in this directory.

ll /etc/bash_completion.d
.rw-r--r-- 1  439 root root 14 Jan 21:06  git-prompt
.rw-r--r-- 1  379 root root  8 Nov  2023  global-python-argcomplete
.rw-r--r-- 1 1.9k root root 18 Mar 05:10  mscs

I also have a bunch more files in /usr/share/bash-completion/completions/, like you. So in some cases, some will have this directory if other programs created it.

The makefile needs to be updated to test for the new directory and use that instead. I'll make a PR to change the makefile to detect the new location. For now, you can override the location with this

make MSCS_COMPLETION=/usr/share/bash-completion/completions install

Or edit the makefile and change the path for MSCS_COMPLETION

zanix avatar Oct 11 '25 20:10 zanix