Open nisbet-hubbard opened 1 month ago
Hm yeah this is a good question
I think there is a tension between Oils working the same everywhere, and having each distro customize it
I think the main thing that is local to a distro is completion of commands that are available, but based on my experience with bash-completion
it is hard to get that right ...
I think fish does a bit better -- as far as I remember, they have a Python script that scrapes man pages, and generates .fish
files in a directory that can be loaded at runtime
I'm not sure how distros actually integrate that, but I'd be interested in finding out
Looking at Neal Gompa’s spec file for Fedora’s fish package, what he did is he installed a completion directory during cmake:
-DCMAKE_INSTALL_SYSCONFDIR=%{_sysconfdir} \
-Dextra_completionsdir=%{_datadir}/%{name}/vendor_completions.d \
-Dextra_functionsdir=%{_datadir}/%{name}/vendor_functions.d \
-Dextra_confdir=%{_datadir}/%{name}/vendor_conf.d
Packagers of other software are then asked to each install their .fish
file using the %{fish_completions_dir}
macro: https://docs.fedoraproject.org/ca/packaging-guidelines/ShellCompletions/.
Just wanted to mention that distros can ship default configuration files, with the option to not overwrite user changes, eg https://docs.fedoraproject.org/en-US/packaging-guidelines/#_configuration_files.
Since bash has minimal default config files and I see you’ve made a start here https://github.com/oils-for-unix/oils/wiki/How-To-Test-OSH#my-oshrc-file, maybe at some point it’d be good idea to formalise this into a default
oshrc
?