3 ms·
same with h which can either mean hour or the planck constant. units(1) does this right where one symbol corresponds to one unit only
by Faaak 5y ago
same with h which can either mean hour or the planck constant.
units(1) does this right where one symbol corresponds to one unit only
- chrismorgan 5y agoMmm, true. I started using units(1) quite recently, and “h” being the Planck constant rather than hours keeps on tripping me up. The built-in abbreviation “kph” for km/hr isn’t comfortable either. (mile/hr may be commonly abbreviated as “mph”, but km/hr is conventionally “km/h”). Ah hah! There, just created ~/.units containing `h hr`, now this will bother me no more (since I’m unlikely to ever want to use the Planck constant). Pity it doesn’t use XDG paths (which would probably land the file at ~/.config/units), though you can define the environment variable MYUNITSFILE.
- franga2000 5y ago> Pity it doesn’t use XDG paths Yes!! Can we all just agree to make that illegal? If a developer writes an app that automatically defaults to having configs right in the home dir or if they don't separate their cache from their persistent data, they go to jail for a week to think about what they did. All joking aside, it really is a shame so many things don't stick to the standard. The ability to just copy .config to another machine and have it be pretty much a carbon copy of the original would be really useful. I guess I should just finally switch ti Nix, huh?
- zimpenfish 5y ago> If a developer writes an app that automatically defaults to having configs right in the home dir To be fair, I think `units` and `~/.units` predate XDG paths by a couple of decades at least (`units` was from Bell Labs, XDG paths are from somewhere around 2005-2010 as best I can find.)
- franga2000 5y agoOh yeah, definitely, and so do most other programs that don't respect the standard (VS Code being the biggest exception). Still, wouldn't hurt to update things a little, although in the grander "backwards compatibility vs modernisation" debate, this is still a small and insignificant issue.
- galangalalgol 5y agoI don't think anything I use uses those paths, I'd never even heard of them. Vscode, conan, cmake, gdb, perf, docker, vim, git, any of those use it?
- mananaysiempre 5y agoGit does (though it will use the old-style dotfile if one is present). All of modern GNOME and I think KDE does. More generally see <https://wiki.archlinux.org/title/XDG_Base_Directory https://wiki.archlinux.org/title/XDG_Base_Directory>.
- zimpenfish 5y ago> same with h which can either mean hour or the planck constant. To be fair, I think the probability of a normal person using 'h' to mean the Planck constant is low enough that "2h" meaning "2 hours" is going to be right ~100% of the time. (Although, actually, having just learnt that `units` comes from Bell Labs, they might well have been using 'h' for Planck constant more than for hours.)