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

Parameterize bat name, documentation. #659

Closed
4 tasks done
eth-p opened this issue Sep 9, 2019 · 4 comments · Fixed by #673
Closed
4 tasks done

Parameterize bat name, documentation. #659

eth-p opened this issue Sep 9, 2019 · 4 comments · Fixed by #673
Labels

Comments

@eth-p
Copy link
Collaborator

eth-p commented Sep 9, 2019

In order to make life easier on package maintainers, we should give them the ability to easily rename bat and its documentation when building a package.

  • Rename the man page
  • Parameterize the executable name in the man page
  • Rename the completions
  • Parameterize the executable name in the completions
  • Rename the executable
    This is too hacky with cargo.
    Just use an external shell script.

This issue is derived from #656

@eth-p
Copy link
Collaborator Author

eth-p commented Sep 9, 2019

@sharkdp To make this easier to implement and more configurable for package maintainers, should we create a series of scripts to build the packages for each kind of package manager?

You already have something similar going on in your CI scripts, and I could probably adapt them to work as command line scripts like build.sh in bat-extras.

Additionally, would it be better to do all the packaging work in a different repository (e.g. bat-packaging) and add that as a submodule to this one? That would keep the bat repository focused on bat itself, and keep all the packaging scripts separate.

@sharkdp
Copy link
Owner

sharkdp commented Sep 14, 2019

* Parameterize the `BAT_` environment variables

As discussed in #656, I think the environment variables should not be parametrized.

I think the shell completion script(s) might also need parametrization.

@sharkdp To make this easier to implement and more configurable for package maintainers, should we create a series of scripts to build the packages for each kind of package manager?

I'd really rather not be involved in package management issues. We certainly help package managers with specific issues that appear when they want to package bat, but I (personally) don't want to maintain any distribution-specific things in this repository (or any other). The Debian packages are an exception to that, as (1) it is a very large user base and (2) there is no official bat package yet.

@eth-p
Copy link
Collaborator Author

eth-p commented Sep 17, 2019

I removed a couple of the list items that related to packaging or parameterizing the environment variables.

I'd really rather not be involved in package management issues. We certainly help package managers with specific issues that appear when they want to package bat, but I (personally) don't want to maintain any distribution-specific things in this repository (or any other). The Debian packages are an exception to that, as (1) it is a very large user base and (2) there is no official bat package yet

That's fair. It would be unnecessary overhead for bat maintainers, and creating packaging scripts would be better left to the package maintainers who know their ecosystems better.

@paride
Copy link

paride commented Sep 24, 2019

I agree this can and should be made in a distro-agnostic way. Having a single place (e.g. a variable) where the binary name is defined would be file. Applying a simple patch is not a problem at all, the difficult part in the current state would be going through all the places where the bat string is used and replace it with batcat when appropriate, and keeping this up to date with the newer versions.

For the manpage, could a rust templating library be used to generate the manpage file with the correct command name in it?

In general I'm trying to think of a solution that we'll be then able to use in for fd too.

Thanks for your help here!

@eth-p eth-p changed the title Parameterize bat name, documentation, and environment variables. Parameterize bat name, documentation. Sep 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants