-
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
[MVP][WIP] less
like pager
#6984
Conversation
whoa! that's so cool. trying to figure how to get out of it now though. LOL - figured it out |
I don't like the pun name, for these reasons:
My proposal is renaming it to something like |
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
@zhiburt This is my torture test for all things related to tables. :) i've learned to expect that nearly no software can draw this correctly. however, a tui has potential if it could calculate the column widths of the total file and pad it, although collecting for measurement isn't ideal. |
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
I did a few improvements here and there and I think it's more or less in a good state. A few questions;
I've run through some part of it, and seems OK.
Good points; @webbedspace |
@zhiburt I think PGUP and PGDOWN are good and also letting Notice the artifacts of lines on the right side and sometimes text not erasing as well as the columns jumping around. not sure if there's anything you can do about these things but it's what i was talking about. |
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Interesting.... Could you check whether it was fixed? |
Not fixed. It still exhibits the same artifacts. I tried in Windows Terminal and in Tabby. |
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
that's interesting. I've spend some time to do a recursive logic to get inside inner values. But wanted to know whether it's worth to continue. The idea is if the value is actually a record/list we can inspect it further in a pop up instead of having PS: Personally I kind of feel it's more logic than a simple pager like |
Oh wow! Ya, that's totally cool. In think being able to inspect things is a good add. |
Nice, this is cool. So, if the list is a table it shows like Also, it needs some highlighting or something to show you where your cursor is or what row is selected. For instance, I did |
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
So you need to press
Added some support of it, though not 'column based'.
Arguable thing, but surely being able to make it more customarily could be great. (like whether you you use cursor or selection etc.) PS: I think you search in column is good idea, I also can picture different kind of sorts could be beneficial too (like search by the whole structure so if we found something somewhere deep in the value tree we would be able to get in there. right from search) |
nice - looks good! it's really fun to play with. |
…tui-b Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Must be done
Renamed to |
Thanks @zhiburt. I tested with One quick question, Is there a way to debug the keybindings? I can't get pageup and pagedown to work in Windows in preview mode. Here's another little bug?
|
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
I don't think so but how it would look?
There was no such keybindings, but I've added it.
Made it so. |
As long as the keybindings work, there's no need for it. I was just wondering if there was something like |
Playing with it again this morning. Found a small bug.
Logging these ideas here (not required for this PR but will want to do eventually)
|
We all agreed to land this, just a few small things. Could you write up what user-facing changes you introduced? Seems like there is at least the Thanks for the hard work, it really feels amazing and is a huge step forward in Nushell's interface! |
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
Fixed. It's actually was not a bug but a logic :)
Not sure what is the best way.
Not sure whether it's good but I've made is so. (To be candor it's a bit laggy?) |
Only Yes I guess some sort of manual would be beneficial. |
Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
…tui-b Signed-off-by: Maxim Zhiburt <zhiburt@gmail.com>
I mean, could you put these into the PR description (see the PR template)? It makes it easier for us when compiling the release notes and if somebody wants to look up the PR later for some reason. |
It also introduced some new config settings, these are also user-facing changes. |
I updated the OP's issue text a bit, just to change the name to |
@zhiburt I found another glitch. Let me know if this is supposed to work or not. I can't do BTW - I like how you highlighted the borders in double-lined borders. Nice work. |
For me @zhiburt Sorry for the ping, the steps to reproduce the panic:
|
oh, but Oh oh, i see. If you type LOL - I just found something else fun. Make sure you're in try mode and type |
Made it being ignored.
Ohhhhh sorry. Must be fixed. |
just fyi @zhiburt - i'm compiling information based on feedback from the team. i'll tag you in that issue when i create it. |
Run it as
explore
.example
ls | explore
Configuration points in
config.nu
file.You can start without a pipeline and type
explore
and it'll give you a few tips.If you type
:help
you an see the help screen with some information on what tui keybindings are available.From the
:help
screen you can now hiti
and that puts you incursor
akainspection
mode and you can move the cursor left right up down and it you put it on an area such as[table 5 rows]
and hit the enter key, you'll see something like this, which shows all the:
commands. If you hitesc
it will take you to the previous screen.If you then type
:try
you'll get this type of window where you can type in the top portion and see results in the bottom.The
:nu
command is interesting because you can type pipelines like:nu ls | sort-by type size
or another pipeline of your choosing such as:nu sys
and that will show the table that looks like this, which we're calling "table mode".If you hit the
t
key it will now transpose the view to look like this.In table mode or transposed table mode you can use the
i
key to inspect any collapsed field like{record 8 fields}
,[table 16 rows]
,[list x]
, etc.One of the original benefits was that when you're in a view that has a lot of columns,
explore
gives you the ability to scroll left, right, up, and down.explore
is also smart enough to know when you're in table mode versus preview mode. If you doopen Cargo.toml | explore
you get this.If you type
open --raw Cargo.toml | explore
you get this where you can scroll left, right, up, down. This is called preview mode.When you're in table mode, you can also type
:preview
. So, withopen --raw Cargo.toml | explore
, if you type:preview
, it will look like this.