horizontal scrolling bash window (turn off line wrapping)

Asked

Viewed 27 times

0

I’ve searched all the forums, and in Bing/google until tired, I didn’t find anything, probably by manezice, is it possible to put a horizontal scroll bar in window bash?

I saw in some places that this is not a good idea, but I think about going back to configuration when finishing a specific task or installing another terminal, and when I need this feature use a specific one. inserir a descrição da imagem aqui

Note that in this image, the command passed the width of the window, and ideally it would put a horizontal scroll.

  • Which ones? Which Bash?

  • Ubuntu 18.04, MATE-terminal

  • I saw some people talking about less, but I couldn’t use it, they also talked about terminator, but I also couldn’t get the horizontal scroll

1 answer

0

--- Editing ---

I got a better option yet, with the command most it does not come installed in Ubuntu 18.
to install: sudo apt-get install most -y
then just use it with:
docker ps -a | most
His navigation found it better than with the less, and it already removes word-wrapper by default.


I got it with the remote less

For example, when executing the command docker ps -a the result does not fit in the window width.

So we can use the less which has numerous options to display a file, or output some command.

command him to stop doing word wrapper is:
less -S --chop-long-lines

to pick up the command output and display with less:
docker ps -a | less -S --chop-long-lines

inserir a descrição da imagem aqui

I found the answer in: https://superuser.com/questions/272818/how-to-turn-off-word-wrap-in-less

Browser other questions tagged

You are not signed in. Login or sign up in order to post.