-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Auto-detect tabular data from command outputs #1608
Comments
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
I'd understand if maintainers close this issue based on an explicit decision not to implement it, but I wouldn't want it to be closed just for being old. |
This issue is being marked stale because it has been open for 90 days without activity. If you feel that this is in error, please comment below and we will keep it marked as active. |
Same as my previous comment. |
With 0.40 released we now have |
For reference, here's the output of git-fame (with non-tabular parts removed) as it is currently interpreted by Original output:
Current
Some ways this could be improved:
The desired behavior (using
Once this behavior is available with commands that are manually added to the pipeline, it should be just a matter of automatically detecting the format in pipelines, like |
you can start to approach wrapping this in a nushell table with the following command |
Leaving my 2cents here as well, since I was running into this.
I tried with |
I doubt we would support auto-detection as it would be a heavy burden to pay for processing the data that's being streamed between commands. That said, we have commands like Closing this issue, but please open specific issues against the |
I already did so above. I would prefer this issue to be kept open and re-scoped to be about better behavior of |
@waldyrious I concur. Such a use case for tabular data coming from the wild is indeed a serious one and would warrant an ongoing discussion. I am hitting all of the above issues, personally. If support for that kind of autodetection is too heavy a burden for the core nu shell team, it should be a separate plugin project. But no matter what, this feature needs to be supported somehow. |
@waldyrious
😉 😇 |
@amtoine What's the problem with the title ? |
if this becomes about re-scop[ing] to be about better behavior of however, make |
@amtoine Well, it seems unclear whether this is or is not about
In my opinion, the question being debated here is the scope the nushell developers want to have for So, I'd suggest the title: Clarify the scope of nushell support of detect columns for tabular data on the Wild Wide Web. If that question is settled, we'll then be able to know what should be implemented in Proper support for markdown tables in |
makes sense 👍 the title you put forward Clarify the scope of nushell support of detect columns for tabular data on the Wild Wide Web. sounds sensible as a first step 👍
|
Upon revisiting the entire thread, I suppose it might make sense to let it stand as a record of both the explicit request, and rationale, for Nushell to automatically detect tabular data outputted by non-nushell CLI programs (explained in the opening comment), i.e. without manually piping the data to
Therefore, even though I suggested earlier that I would be open to rescoping the issue, I now believe it would be a disservice to the project's records to hide that explicit discussion on auto-detection, so my stance is now that a separate issue might be the best approach here, especially because it can make the question under discussion more explicit and specific, as @g-yziquel argues for above. |
This is likely something that has been discussed already, and parts of it may even be already implemented, but since I couldn't locate a discussion in the issue tracker, I thought I'd open an issue myself.
I understand that the current strategy of Nushell is to provide commands that output structured data, and offer a way for other commands to do so as well so that Nushell can integrate them within rich pipelines. I am not sure how much of this is expected to remain explicit, though — the 0.12 release post mentions inference of data types:
...but beyond individual data points, I suppose the long term ambition is to be able to also infer the structure of unstructured data, right? So I suppose that would look like the ability to automatically detect tab-separated output, or space-aligned values, or even interpret common types of ASCII or Unicode tables (such as those built with box-drawing characters), and seamlessly convert them to structured data Nushell can work with.
I know that this is already possible when opening structured files that Nushell knows how to recognize, as described in #1018:
So to be clear, I'm talking about inferring structure from the stdout of regular commands, like this one, or this one, or #619, or #443.
Is this part of the roadmap? Is this described or discussed elsewhere in more detail? To me it sounds like a crucial piece to allow Nushell to take off and integrate with existing tools; manually implementing structure-friendly versions of commands, as was done with
ls
,ps
, etc., doesn't seem as scalable.The text was updated successfully, but these errors were encountered: