Add bash-completion support #140

Merged
merged 4 commits into from Jan 25, 2013

Projects

None yet

3 participants

@gentoo90

Note that you can't just source ag.bashcomp in a command line. Add simlink to it to your bash-completion list or it will not be able to find have helper function.

@ggreer
Owner

Neat. I've never messed with bash completion stuff before, and I had no idea how it worked until now.

My only gripe is that make install doesn't set up bash completion. Add that and I think this'll be good to merge.

@Zearin

+1! I love it when tools add completion. Thanks!

@gentoo90

Added installation to /usr/local/etc/bash_completion.d/ by make install. User probably will have to add symlink to it by hand.
RPM spec will install into %_sysconfdir/bash_completion.d/ (I hope %_sysconfdir == /etc, can't test this). Example was http://git.openvz.org/?p=vzctl;a=blob;f=vzctl.spec

In Gentoo completion files are installed into /usr/share/bash-completion/ and then user can enable or disable them by eselect. In OpenSUSE they are installed directly to /etc/bash_completion.d/. Other distros may have their own rules.

@ggreer
Owner

Cool. I guess that about as good as it can be given the constraints of installing on different distros.

Nice work.

@ggreer ggreer merged commit 311382d into ggreer:master Jan 25, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment