Blacklist program from bash completion

Fedora comes with "gstack" and a bunch of "gst-" programs that continue to appear in my bash assurances when I try to quickly enter git aliases. They, of course, are installed in / usr / bin along with a thousand other programs, so I can’t just remove their directory from my PATH. Is there any way in Linux for blacklists to run these specific programs?

I tried the environment variables FIGNORE and GLOBIGNORE, but they do not work, it seems that they are only to complete the file after you entered the command.

+6
source share
2 answers

I don’t know if you can blacklist specific files, but from the command history you can end the path, not the path. To do this, add the following line to ~/.inputrc :

TAB dynamic-complete-history

+1
source

FIGNORE for SUFFIXES only. For some reason, it suggests that you want to blacklist the entire class of files. Therefore, you need to knock down the first letter.

eg. To exclude gstack from autocomplete:

FIGNORE=stack

Will change gstack , and also delete everything that ends on stack .

0
source

Source: https://habr.com/ru/post/981784/


All Articles