Skip to content

updated nushell zoxide.nu to support overlay use over source #985

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KamilKleina
Copy link

Overview

This update changes the zoxide.nu template by switching from using the source command to overlay use. The new approach offers a more flexible and manageable way to load command definitions in Nushell.

Why Switch to overlay use?

  • Scope:

    • source: Loads definitions directly into your global session, making them always active.
    • overlay use: Loads definitions into a separate overlay (a distinct layer) that you can easily toggle on or off as needed.
  • Management:

    • source: Once loaded, definitions stick around for the entire session until explicitly changed.
    • overlay use: Overlays give you more control – you can list, hide, reload, or rename them. This means you can decide exactly which sets of definitions are active at any time.
  • Use Cases:

    • source: Great for quickly running a script and having everything immediately available.
    • overlay use: Perfect for a modular setup where you want the ability to add or remove groups of commands without cluttering your global environment.

Conclusion

By moving to overlay use, this update makes your Nushell experience cleaner and more organized. It offers a more modular and reversible way to manage your environment, giving you fine-grained control over your commands and settings.

Feel free to review the changes and let me know if you have any feedback. Thanks!

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

Successfully merging this pull request may close these issues.

1 participant