-
-
Notifications
You must be signed in to change notification settings - Fork 2k
dircolors: add nushell integration #6963
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
base: master
Are you sure you want to change the base?
Conversation
Half of these changes are an unnecessary refactor, unrelated to Nushell integration. Specifically, all the lines related to replacing You appear to be adding support for running tests on Darwin. That should not be in the same commit as adding Nushell integration. I question whether its necessary at all, but I'm not sure what the precedent is for tests supporting Darwin. I disagree with how Nushell integration is implemented here. You appear to be running a Bash script at rebuild-time, which generates a Nushell script, which sets Although, now that I think about it, using Nushell to parse the output of In conclusion, I recommend closing this pull-request. |
b1b734c
to
44fc38a
Compare
eb66ede
to
823dd19
Compare
No, they are not unnecessary, if I remove them I won't be able to use the
I don't use Darwin and couldn't care less about Apple as a whole. But most nushell related tests I saw in the home-manager codebase use this kind of logic for Darwin compatibility. I can remove the if else check that implements Darwin support but why do that? It will introduce inconsistency between the way nushell tests are implemented.
Well, it may be called a hack but it turns whatever the output of If I implement a parser in nu that parses the output of In my opinion this nushell integration is technically superior to all
Something is telling me that getting nushell supported by dircolors (a coreutils program) is going to be a lot harder than opening a PR to home-manager. You are right that nushell is unstable and unsupported by a lot of stuff, but in my experience when you combine Nix+Home-Manager with Nushell it can become the best shell. I never had a shell so fast and snappy yet functional before I tried Nushell+Nix. And I think nushell could start even faster and snappier if more nushell integrations were implemented in the same way as the one in this PR. There are still some things that Nix can't fix. Like for example atrocious VIM emulation in Nushell, but I am sure at some point it will be fixed and bash/zsh don't even have VIM emulation built in so it's an unfair comparison. So what I am trying to say here is that it's true that nushell needs development, but If nobody is going to try it and stick around then there likely won't be much development. I am trying to make it as easy as possible to use nushell with home manager by upstreaming whatever I already invented in my configuration that helps this goal. It's very easy to try things out with Nix by changing a couple of configuration options and go back if you don't like it. This is how Nix encourages experimentation. But if you change those configuration options and suddenly |
e5b2293
to
2c57d64
Compare
I don't disagree that your solution is more efficient than running |
You may be right, but I don't know of a better place. Also there are already quite a few more home manager integrations that use A LOT more Nu code than |
@khaneliman Your opinion on this? ''
eval "$(${lib.getExe' cfg.package "dircolors"} -b ${dircolorsConfig})"
echo "export-env { \$env.LS_COLORS = \"$LS_COLORS\" }" >> $out
'' came from #6941 (review) |
I'm not really understanding the concern here atm... it's an optional integration to an optional shell just to populate LS_COLORS with the |
2c57d64
to
e8899ba
Compare
Description
Adds nushell support to dircolors module
Checklist
Change is backwards compatible.
Code formatted with
nix fmt
or./format
.Code tested through
nix-shell --pure tests -A run.all
or
nix build --reference-lock-file flake.lock ./tests#test-all
using Flakes.Test cases updated/added. See example.
Commit messages are formatted like
See CONTRIBUTING for more information and recent commit messages for examples.
If this PR adds a new module
Maintainer CC
@justinlovinger