Including the "less" pager shell command

What features/apps/bugfixes needed in a future Puppy
Post Reply
Message
Author
RHTopics

Including the "less" pager shell command

#1 Post by RHTopics »

The less pager shell command is a useful tool for viewing text files from the command line.

With its ability to move up and down in a text file, it is more capable than the included more command.

It would be good to see it included in Puppy Linux.

Thanks

User avatar
Bancobusto
Posts: 168
Joined: Mon 13 Jun 2005, 20:52
Location: Vancouver Island

#2 Post by Bancobusto »

I agree. From what I've gathered, it's superior in every way. :P

<But, MORE is functional, so that works for most, according to the philosophy that less isn't allways worse than more, and more isn't always better... OMG, what a word game...>

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#3 Post by rarsa »

Well RHTopics and Bancobusto. It just happens that less has already been packaged for puppy:

It's in the DotPup Contributions page along with many other fine applications.

I would suggest you to browse that page and the GuestToo DotPups pages to find ot what else is there.

RHTopics

#4 Post by RHTopics »

In thinking about your reply, I did some research into using an alternative to the less command.

The more command is part of the busybox application. Looking at the help for BusyBox, it is a multi-call binary that combines many common Unix utilities into a single executable. This single executable comes in a small size of only 296k bytes, while the less command by itself in other linux distros is over 120k. So it is understandable that the less command is not included.

My alternative was to add the following alias command in /etc/profile:

Code: Select all

alias less="vi -R"
The vi editor is also part of BusyBox and lists the -R option in its help options as a way to use the vi editor in read only mode.

Using this alias would provide a simliar experience to the less command. One difference would be rather than hitting the "q" key to quit viewing the file, you would enter ":q" and then press the Enter key.

The only problem is the "-R" option does not work. The file is modifiable, so you would need to enter ":q!" to ensure no changes are made to the file.

My new suggestion is to have a newer version of BusyBox that has fixed this bug in the next release of Puppy Linux.

Thanks

RHTopics

#5 Post by RHTopics »

rarsa, Your reply got posted while I was editing a reply to Bancobusto.

I will check out the DotPup Contributions page.

Thanks

Post Reply