[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
$ PATH=
$ 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
>
- Exclude builtins from command completion, kaycee gb, 2020/01/09
- Re: Exclude builtins from command completion, Chet Ramey, 2020/01/10
- Re: Exclude builtins from command completion, kaycee gb, 2020/01/10
- Re: Exclude builtins from command completion, Greg Wooledge, 2020/01/13
- Re: Exclude builtins from command completion, kaycee gb, 2020/01/13
- Re: Exclude builtins from command completion, kaycee gb, 2020/01/17
- Re: Exclude builtins from command completion, Chet Ramey, 2020/01/17
- Re: Exclude builtins from command completion, kaycee gb, 2020/01/17
- Re: Exclude builtins from command completion, Chet Ramey, 2020/01/18
- Re: Exclude builtins from command completion, kaycee gb, 2020/01/23