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 Nushell integration snippet #89

Closed
wants to merge 1 commit into from
Closed

Conversation

kubouch
Copy link

@kubouch kubouch commented Jun 29, 2023

Adds a code snippet to integrate tere with Nushell.

@mgunyho
Copy link
Owner

mgunyho commented Jun 29, 2023

Thanks! Does this work with options, like tere --ignore-case? And does it ignore stderr, i.e., does tere --version or tere --help work as expected?

@kubouch
Copy link
Author

kubouch commented Jun 29, 2023

Actually, the arg passing wouldn't work with this. We have a way for passing the args, but it wouldn't preserve the cd change outside the scope, we'd need to update this.

Not sure why ignoring stderr is necessary. The original tere --version or tere --help will print the stuff as expected, exiting with 1.

@mgunyho
Copy link
Owner

mgunyho commented Jun 30, 2023

Not sure why ignoring stderr is necessary. The original tere --version or tere --help will print the stuff as expected, exiting with 1.

Ah, so the exit code of 1 returns from the function and prevents it from trying to go inside the if statement? The point is that the output of --help and --version go to stderr, so that stdout is empty, and we don't try to do cd <output of --version>. But if --version works and it doesn't print something like cd: folder 'tere 1.4.0' not found then all is good.

I am not familiar at all with Nushell, so I don't know how to make the argument passing work.

@kubouch
Copy link
Author

kubouch commented Jul 3, 2023

Currently, we have simple argument passing which could be used here but currently, it wouldn't be able to preserve the changed directory, we'd need to fix that. I'll close this PR then until it's done.

@kubouch kubouch closed this Jul 3, 2023
@kubouch kubouch deleted the patch-1 branch January 18, 2024 09:34
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.

None yet

2 participants