How do you make less show the filename?

grasevski

I often have multiple terminal windows opened with less (eg comparing various log files). I forget which file is which. Is there a similar command to ^G in vi which displays the name of the file currently being viewed?

Gilles 'SO- stop being evil'

Compatible: ^G. Easy to type: =. Less copied several key bindings from vi, including this one. This displays the file name (the path that you passed on the less command line) and the position in the file.

You can have this information permanently by calling less with the -M option. Include -M in the LESS environment variable. You can set this variable in your ~/.profile, ~/.pam_environment or wherever you define environment variables. Alternatively, you can set LESS by using lesskey to produce the configuration file ~/.less which is read by less.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do you make a LESS mixin for gradients with a variable number of stops?

From Dev

How do you make an MVC Webgrid show multiple lines in a cell?

From Dev

How do you suppress the --show-name (filename) option when git blame?

From Dev

How do you rename a library filename in CMake?

From Dev

How do you sort a list of filepaths by the filename?

From Dev

How do you sort a list of filepaths by the filename?

From Dev

How do I less a filename rather than an inode number?

From Dev

How do I make `less` output colors?

From Dev

How do I make `less` output colors?

From Java

How do you make a calculator?

From Dev

How do you make an image show beside stacked text inside an H1 tag?

From Dev

How do you make HTML run instead of show html commands from a database?

From Dev

How do you output the filename in find command while using -exec?

From Dev

How do you override the warning "filename is not commonly downloaded" for a specific file?

From Dev

How do you set the filename for a JAXWS MTOM Attachment?

From Dev

How do you open multiple files with dash'-' at the start of filename?

From Dev

How do you show output of assert in Meteor?

From Dev

How do you animate ng-show?

From Dev

In XSD, how do you show mixed content?

From Dev

How do you remove the Show Applications button?

From Dev

How do I show Filename, Line Count, and Character Count in vim?

From Dev

How do you install less css command line compiler?

From Dev

How do you install less css command line compiler?

From Dev

How do you run `less` and have it run a search pattern automatically?

From Dev

How do I make grep list the count of matches before the filename?

From Java

Flutter: How do you make a card clickable?

From Dev

How do you make a static class in swift?

From Dev

How do you make speech bubble with Tooltipsy?

From Dev

How do you make a circle from origin

Related Related

  1. 1

    How do you make a LESS mixin for gradients with a variable number of stops?

  2. 2

    How do you make an MVC Webgrid show multiple lines in a cell?

  3. 3

    How do you suppress the --show-name (filename) option when git blame?

  4. 4

    How do you rename a library filename in CMake?

  5. 5

    How do you sort a list of filepaths by the filename?

  6. 6

    How do you sort a list of filepaths by the filename?

  7. 7

    How do I less a filename rather than an inode number?

  8. 8

    How do I make `less` output colors?

  9. 9

    How do I make `less` output colors?

  10. 10

    How do you make a calculator?

  11. 11

    How do you make an image show beside stacked text inside an H1 tag?

  12. 12

    How do you make HTML run instead of show html commands from a database?

  13. 13

    How do you output the filename in find command while using -exec?

  14. 14

    How do you override the warning "filename is not commonly downloaded" for a specific file?

  15. 15

    How do you set the filename for a JAXWS MTOM Attachment?

  16. 16

    How do you open multiple files with dash'-' at the start of filename?

  17. 17

    How do you show output of assert in Meteor?

  18. 18

    How do you animate ng-show?

  19. 19

    In XSD, how do you show mixed content?

  20. 20

    How do you remove the Show Applications button?

  21. 21

    How do I show Filename, Line Count, and Character Count in vim?

  22. 22

    How do you install less css command line compiler?

  23. 23

    How do you install less css command line compiler?

  24. 24

    How do you run `less` and have it run a search pattern automatically?

  25. 25

    How do I make grep list the count of matches before the filename?

  26. 26

    Flutter: How do you make a card clickable?

  27. 27

    How do you make a static class in swift?

  28. 28

    How do you make speech bubble with Tooltipsy?

  29. 29

    How do you make a circle from origin

HotTag

Archive