[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exclude builtins from command completion

From: kaycee gb
Subject: Re: Exclude builtins from command completion
Date: Thu, 9 Jan 2020 22:30:15 +0000

Le Thu, 9 Jan 2020 13:51:28 -0800,
Andy Chu <address@hidden> a écrit :

> Try this:
> $ complete -D -W 'foo bar'
> Now hit <TAB> at an empty prompt and you'll only get foo and bar.  No
> builtins.

I already use the -D switch coupled with -F to get custom list. It works at an
empty prompt. No problem there. 

Even in your example with the rcfile like below, it exposes what I see and do
not want. 

$ bash --rcfile /dev/null
$ complete -D -W "foo bar"
$ <TAB><TAB>
foo bar
$ f<TAB><TAB>
false     fc        fg        fi        for       function
$ exit

As you can see it suggests all builtins that starts with f and worst it won't
show custom commands ( but that is managed on my side )

> This works in bash 4.3 and should work in all later versions (and many
> earlier).
> This may also be useful to disable your bashrc:
> bash --rcfile /dev/null
> Andy

reply via email to

[Prev in Thread] Current Thread [Next in Thread]