Re: Exported (ba)sh functions in the environment
[Philip Ashmore]
> I guess I'm confused as to why bash completion needs these.
Easy enough to read /etc/bash_completion and /etc/bash_completion.d/*
and see for yourself why it needs these.
bash-completion is full of special cases to "do the right thing" in
hundreds or thousands of different circumstances. If it were as simple
as "offer a list of filenames when you hit tab", that's already built
in to bash and we wouldn't need bash-completion as a separate package.
As a _very_ simple example, if you type 'kill <tab>', you get a list of
current process IDs. If you type 'kill -<tab>', you get a list of
signals, plus the common options -l and -s.
If you can think of a way to implement this same stuff (and remember,
bash-completion supports a _lot_ more complex cases than 'kill')
without adding 200 kB of shell functions to bash's runtime, by all
means, do it and see how it works out.
Peter
Reply to: