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

Default oshrc to ship with oils? #2085

Open
nisbet-hubbard opened this issue Sep 27, 2024 · 2 comments
Open

Default oshrc to ship with oils? #2085

nisbet-hubbard opened this issue Sep 27, 2024 · 2 comments

Comments

@nisbet-hubbard
Copy link
Contributor

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?

@andychu
Copy link
Contributor

andychu commented Sep 28, 2024

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

@nisbet-hubbard
Copy link
Contributor Author

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/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants