On 01 Feb 2022 18:18, Karl O. Pinc wrote: > On Tue, 1 Feb 2022 18:24:57 -0500 Mike Frysinger wrote: > > ... let's focus on unrelated interesting > > parts you've proposed. > > > > > Absent having bracketed paste off by default, it might be nice > > > to have a /etc/inputrc.d/ directory that can have it's contents > > > included by /etc/inputrc. > > > > it would be nice if the $include directive supported directories, or > > at least globs. then one could do: > > $include /etc/inputrc.d/ > > $include /etc/inputrc.d/*.conf > > > > the glob approach would sidestep the bikeshedding of what implicit > > globs readline should use, and whether it should handle dot files, or > > ~ files, or whatever else. > > Agreed. Always crazy when there's ~ files or files with/without > extensions that are/aren't read and result in strange behavior. > > That said, before adding yet another feature, somebody who > knows more than me should examine whether there's really a use-case. > I think of the typical case, like cron, where packages might > want to add their own configuration to the system in an isolated way. > I don't see the same sort of need in the case of readline, but > would like to hear more.
i think .d config dirs do double duty: packages get a place to drop their fragments in (which, in the case of inputrc, i agree seems pretty unlikely), and site admins get to customize the global defaults without having to fight their distro update story (e.g. via puppet or chef or admin tooling). which is exactly what you've requested. i think such a feature makes sense, and i would prob leverage it a bit myself. > > > That way there's not another > > > config file that's different from the distro default that > > > has to have changes merged on system upgrade. (On the third > > > hand, yet more complication....) > > > > you can already do this now. readline reads your ~/.inputrc first, > > and then falls back to /etc/inputrc only if that doesn't exist. > > Many of my systems are single-user. The system wide config > works for root. (Via su - or whatever. Prefacing "sudo" > in front of every command when doing system-level stuff for > hours is silly.) i leverage `sudo -i` myself. or `sudo -i --` if someone added a check for the default `sudo -i`. for my single admin systems, i link /root/.inputrc to my ~/.inputrc. but that wouldn't help for your other user cases that you discuss. it's not something i ever do as in those infrequent cases i tend to use `sudo -u ...` to run the one-off commands. -mike
signature.asc
Description: PGP signature
