-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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 note about different command name in Debian/Ubuntu #982
Comments
There isn't much we can do about the Debian-maintained package. It had to be changed (see #656) from Documenting the fact that |
I do not know how I feel about post-install messages as I am generally not a big fan of them and they may easily be overlooked. I think the most user friends thing would be to document it in the README and if possible in the page which shows up when typing |
I made a PR (#986) for documenting it in the README, but it's up to the Debian package maintainers to add a note about the executable name to the package description in |
See also: #905 (comment) Apart from the README in this repo, this is already documented in pretty much every place that I could think of.
@paride as expected (#656 (comment)), the rename of |
The rename is documented in the @eth-p blocking the install process it's something that we generally try to avoid. There is a mechanism for doing so but it's normally used when a new version of the package implements changes the user has to be warned about. I don't think it's appropriate in this case.
@sharkdp I don't think a petition is viable. The Debian policy is clear on this point, and the package already providing a binary named Ubuntu inherits the package from Debian as-is, so changes in Debian will land in new Ubuntu releases. |
Yes I just checked the output of From my point of view we point out the change wherever it is plausible and will close this issue. If someone sees more room for improvement feel free to reopen this. |
The "tail" if the description is a bit confusing:
this part is fully auto-generated by the Debian tooling for packaging Rust crates. I'll check if there's a way for overriding or hiding it, as it's not really useful in this case. |
Oh right, once you investigated that I will close this. Thank you |
Thank you for your replies.
Oh, I definitely wasn't proposing to change anything in the
Note that the file currently has a typo: it says Another thing: I seem to remember that the package for |
Yes, and it would prevent users from installing both packages, and it's reasonable to think one could want to use both. Truth is: there is not clean solution other than one of the tools involved renaming the binary.
Thanks!
It is possible, but I'm not sure I really like that solution. And the manpage has to be handled in a consistent way. I think symlinking batcat to |
Mmh, maybe we can ask the user at install time if automatic setup of shell aliases is wanted, making sure that the alises are only valid for interactive shells. I have to think about it. How does it sound to you? |
👍 I have updated the README: 54a85d9 4be66f8
Is there any precedent for that? Do other packages do this (or similar things) as well and how common is that? The obvious downside is the interruption in the automatic installation process. On the other hand, Where would that alias be placed? Is there something like a In general, I like the symlink solution much better than the alias. This way, |
I'm not sure
I'm not aware of any precedent. I'll certainly ask the debian-devel mailing list, as I agree it's kind of an odd solution.
I was thinking of |
done 👍
Thank you
Sounds good. |
After thinking about it a bit more I don't think adding system-wide aliases is a good idea anymore. Are we going to need to check that aliases do not clash then? And it will only with with specific shells. In general, it's a ugly workaround for something we have to live with: in Debian/Ubuntu the binary has another name. That's it. I couldn't find a way to easily remove the auto-generated "This package contains the following binaries" boilerplate from the package descriptio, but I filed: https://salsa.debian.org/rust-team/debcargo/-/issues/36 Let's see what the people that developed the Debian tooling think. Pity that newer versions of bat can't be easily packaged yet. This is in good part due to dependencies on crates with version |
As I think most points are resolved now I will close this |
There's still one typo need to be fixed
|
The typo was fixed in Debian back in January: https://salsa.debian.org/rust-team/debcargo-conf/-/commit/0fde65a873b03cf24e15c0dd0e861c18b6736852 Ubuntu Groovy has the updated package. |
Let us know if there is anything we can do here to help. |
Yeah, I was using focal and 'batbat' is still there. Not checked other repositories. |
See sharkdp/bat#982 for details.
I get that the Debian maintainers probably can't do this (although it was done with GNU Parallel and moreutils' sudo dpkg-divert --package batcat --add --rename --divert /usr/bin/bat /usr/bin/batcat |
Add symlink from batcat to bat (Ubuntu 22.04 LTS): |
What about Debian Alternatives?
Could bat be treated as an alternative for cat? Would this help with anything discussed in this topic? |
No, not at that level. A shell alias is fine but aliasing at the system level will likely break many scripts as bat is too different in its default behavior from cat. The |
I see. I thought bat acted as a perfect cat replacement when running non-interactively (like bat file.txt > file2.txt) |
Wait. File concatenationEven with a pager set, you can still use bat to concatenate files 😉. Whenever bat detects a non-interactive terminal (i.e. when you pipe into another process or into a file), bat will act as a drop-in replacement for cat and fall back to printing the plain file contents, regardless of the --pager option's value. Doesn't this mean that bat wouldn't break any script? |
Sadly the packaged version of
bat
in Debian and Ubuntu (not 19.10) installs the binary asbatcat
which was very confusing upgrading from 19.10. Maybe we could add a short info under the installation section for Debian/Ubuntu to notify of this difference (and maybe write a mail to the debian packaging team - I do not know if it is their fault and we can change something about this)The text was updated successfully, but these errors were encountered: