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

bug: eza shadows NuShell ls #6687

Open
2 tasks done
oderwat opened this issue Mar 23, 2025 · 3 comments
Open
2 tasks done

bug: eza shadows NuShell ls #6687

oderwat opened this issue Mar 23, 2025 · 3 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@oderwat
Copy link

oderwat commented Mar 23, 2025

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

Shadowing the original ls when enabling eza is extremely problematic for NuShell.

In NuShell ls is not what it is in other shells and can't be replaced by eza. ls outputs structured results and has a large list of options. Doing so creates defects with any NuShell script that use ls.

I see that this seems to be a part of home-manager for some time already. I guess the user base that uses eza + NuShell + 'create custom scripts' is pretty small.

Work around: Disable eza shell integration for NuShell.
Better solution: remove the ls = eza from NuShell aliases. We use e,ee, el and so on.

P.S.: I think that adding any alias for ls is a major problem in any shell!

Maintainer CC

@michaelBelsanti

System information

Sorry, I use flakes and nix-darwin. But it does not matter for this kind of bug.
@oderwat oderwat added bug triage Issues or feature request that have not been triaged yet labels Mar 23, 2025
@michaelBelsanti
Copy link
Contributor

This is why I had split the aliases option into an integration option for each shell, and Nushell is disabled by default. Using other commands for the aliases could be a decent option. I don't think using eza as a drop in replacement for ls is an issue in other shells. If users don't want to use the aliases, they can install the eza package without enabling the option.

@oderwat
Copy link
Author

oderwat commented Mar 23, 2025

I wonder, because I found the ls alias in Nushell is enabled by default. I only had eza.enable=true in the config so far. After adding eza.enableNushellIntegration=false, the alias is gone (and I am 'happy'). I triple checked this (also upgrading my flake sources).

When it comes to other shells, there is less of a problem because eza | tee and eza -l | tee are identical to the ls variants.

@michaelBelsanti
Copy link
Contributor

michaelBelsanti commented Mar 24, 2025

Ah, the default was changed by #6358. It seems its now managed by home.shell.shellIntegration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

5 participants