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

Add support for NuShell (and other shells) via a configuration layer #40

Open
romancitodev opened this issue Dec 5, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@romancitodev
Copy link

Hey!

So, in the last few years, NuShell has become a really awesome and loved shell. It’s Unix-like, multi-platform, and has some cool features like structured data pipelines. It’d be amazing if this project supported it too!

Right now, it works great with zsh, bash, fish, and atuin, but adding support for NuShell (and ideally any shell) would make it way more flexible and appealing to more people.

Here’s what I’m thinking:

The Idea

Add a configuration layer so users can define their shell and its settings in a simple config file. Something like this:

# ~/.config/wrapped.toml

[shell]
infer = true                # Automatically detect shell if true
cmd = ""                    # Path to the shell binary (if not inferred)
history_path = ""           # Path to the shell history
prompt_command = ""         # Optional: command to fetch history

With infer = true as the default, the tool could try to detect the current shell automatically (e.g., using $SHELL or similar). If the user wants more control, they can set infer = false and manually define cmd and history_path.

This way, it’s super flexible while still being user-friendly out of the box.

How It Might Work

  • By default, the tool would try to infer the shell and look for its history file based on common conventions.
  • If infer = false, it would just rely on the user-provided paths.
  • Keep support for zsh, bash, fish, etc., as-is to avoid breaking anything for current users.

Let me know what you think! I can help test it with NuShell if needed.

@YiNNx YiNNx added the enhancement New feature or request label Dec 6, 2024
@YiNNx
Copy link
Owner

YiNNx commented Dec 6, 2024

Hi @romancitodev,
Thanks for the suggestion! It sounds like a great enhancement. If you're interested, feel free to implement it and open a PR 🙌

@romancitodev
Copy link
Author

I actually started testing with nushell first just to understand the workflow itself, but in a few days I will create a PR.

I saw a similar PR was created earlier #17 so I'm going to take inspiration from that.

@romancitodev
Copy link
Author

image

Well, it's working for nushell!

In a few days I'll make the PR and I'll try to start with the wrapped.toml config.

@YiNNx
Copy link
Owner

YiNNx commented Dec 9, 2024

Great to see it working for Nushell! I'll take a look at the PR later.

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

No branches or pull requests

2 participants