Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add bash completion #34

Merged
merged 1 commit into from
Feb 10, 2018
Merged

Add bash completion #34

merged 1 commit into from
Feb 10, 2018

Conversation

silentboatman
Copy link
Contributor

To use bash completion: Rename 'bash_tealdeer' to 'tldr' and move it
to /usr/share/bash-completion/completions/ .

To use bash completion: Rename 'bash_tealdeer' to 'tldr' and move it
to /usr/share/bash-completion/completions/ .
@dbrgn
Copy link
Collaborator

dbrgn commented Aug 20, 2017

This is nice! Some questions:

  • The file contains some of the completions hardcoded in. Would there be a way to generate this through docopt?
  • Are there any conventions on how these files are handled in projects? We probably can't distribute this file through cargo install, but maybe we can make the life for packaging as easy as possible.

@silentboatman
Copy link
Contributor Author

silentboatman commented Aug 21, 2017

I haven't worked with docopt. But the only way that I can think of to get rid of the hard coded os types is to add a flag to tealdeer that lists them. Something like tldr --list-os.

Alot of programs add their bash completion file directly to the bash-completion projet. But that's maybe not the best solution in this case, since there are several tldr programs with (I suppose) different flags..

I haven't seen any standard place were people put their completion files.. but here's some different packages and were they put it in:

  • pacman /scripts/completion/
  • exa /contrib/
  • systemd /shell-completion/bash/
  • task /scripts/bash/
  • ninja /misc/
  • colord /data/

@dbrgn
Copy link
Collaborator

dbrgn commented Feb 10, 2018

Sorry for the long delay, and thanks!

@dbrgn dbrgn merged commit ab9fe95 into tealdeer-rs:master Feb 10, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants