AutoComplete on Mac OS X Terminal - Custom Word List

I would like to autocomplete the arguments in my function foo. I want to keep a list of possible arguments as follows: bar,baba,gugu.

Therefore, when I type foo b[TAB]in the terminal, I would like to have recommendations barand baba.

+4
source share
1 answer

Here you will find: http://freecode.com/projects/bashcompletion

You can install it via the brew: brew install bash-completion. During installation, brew will tell you what to do next - add some lines to your ~ / .bash_profile:

if [ -f $(brew --prefix)/etc/bash_completion ]; then
    . $(brew --prefix)/etc/bash_completion
fi

README, ,

+8

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


All Articles