Hacker News new | ask | show | jobs
by eigenrick 2130 days ago
The equivalent is called `textview` which is a built-in which tries to be a bit more intelligent than `less` with regard to file-types.

The default viewer, which sort of runs at the end of every pipeline is called `autoview`.

Now.. autoview should be calling textview in the cases where the pipeline detects a large text value. It is possible that you're not exactly running a pipeline.

For instance: If you run:

    cat big.log
it is not running a pipeline, just an external command.

If you run:

    open big.log

 you're invoking nushell's mechanism for creating a pipeline sourced by the contents of big.log.  You should also notice that textview is invoked, because there should be a pager. 

Alternatively, you can choose to create a pipeline by pipe-ing the output of cat big.log into something. If you pipe it to textview you should see the same result:

    cat big.log | textview 
Hope that helps!
1 comments

The command that I was trying to use was 'ls', which doesn't seem to play with textview when I try it out 'ls | textview' (just no output at all). textview does work for me with files, as in your example.