Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

[Solved] Incremental search in man page

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
solamour
l33t
l33t
User avatar
Posts: 749
Joined: Tue Dec 21, 2004 11:29 pm
Location: San Diego, CA

[Solved] Incremental search in man page

  • Quote

Post by solamour » Mon Jun 02, 2025 5:52 pm

When I want to search a string in the man page, I need to

1) Press "/" key.
2) Type the string I want to search.
3) Press ENTER key. The search highlight moves to the first instance of the matching string.

Is there way to do "incremental search"; the search highlight moves as I type the string in step 2)? In other words,

1) Press "h", and the highlight moves to the first instance of "h".
2) Press "e", the highlight moves to "he".
3) Press "l", moves to "hel".
4) Press "l", moves to "hell".
5) Press "o", moves to "hello".
6) Press ENTER to accept the current match.

It's the same functionality as "less --incsearch filename". My "PAGER" is currently set to "/usr/bin/less".
__
sol
Last edited by solamour on Mon Jun 02, 2025 6:42 pm, edited 1 time in total.
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Mon Jun 02, 2025 6:25 pm

In typical usage, man delegates to less, so I think you only need to arrange that the invoked less has incsearch enabled by default. For me, LESS=--incsearch man true produces a manual page where incremental search is enabled. If you already set LESS to a non-empty string, you should combine this assignment with the existing options.
Top
solamour
l33t
l33t
User avatar
Posts: 749
Joined: Tue Dec 21, 2004 11:29 pm
Location: San Diego, CA

  • Quote

Post by solamour » Mon Jun 02, 2025 6:42 pm

Hu wrote:If you already set LESS to a non-empty string, you should combine this assignment with the existing options.
That was the magic ingredient I was missing.

Code: Select all

[~/.bashrc]
export LESS="$LESS --incsearch"
Thanks for taking time to share your suggestion.
__
sol
Top
Post Reply

3 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic