Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.linux.suse    |    Suse is actually not that bad    |    138,051 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 137,971 of 138,051    |
|    Carlos E.R. to R Daneel Olivaw    |
|    Re: Text-Searching in "less"    |
|    11 Feb 25 13:41:55    |
      From: robin_listas@es.invalid              On 2025-02-11 09:44, R Daneel Olivaw wrote:       > From the "man" page:       >       >> /pattern       >> Search forward in the file for the N-th line       containing       >> the pattern. N defaults to 1.       >> The pattern is a regular expression, as       recognized by       >> the regular expression library sup-       >> plied by your system. By default, searching is       case-       >> sensitive (uppercase and lowercase       >> are considered different); the -i option can       be used       >> to change this. The search starts       >> at the first line displayed (but see the -a and       -j       >> options, which change this).                     And where do you enter that 'N'?       First time I read this.                     > I'm running Leap 15.6 (which is where that man page extract came from)       > and noticed that my searches are case-insensitive. Of course I do not       > have -i set but it is possible that OpenSUSE generously sets that option       > for me via an alias.              Searches have always been case insensitive inside less, for decades (in       *suse). Since ever. It is the first time I see some one saying they are       not (the manual).              There are a lot of environment variables mentioned in the manual at the end.              cer@Laicolasse:~> set | grep LESS       LESS='-M -I -R'       LESSCLOSE='lessclose.sh %s %s'       LESSKEY=/etc/lesskey.bin       LESSOPEN='lessopen.sh %s'       LESS_ADVANCED_PREPROCESSOR=no       cer@Laicolasse:~>              There you have.               -M or --LONG-PROMPT        Causes less to prompt even more verbose-        ly than more(1).               -I or --IGNORE-CASE        Like -i, but searches ignore case even        if the pattern contains uppercase let-        ters.               -i or --ignore-case        Causes searches to ignore case; that is,        uppercase and lowercase are considered        identical. This option is ignored if        any uppercase letters appear in the        search pattern; in other words, if a        pattern contains uppercase letters, then        that search does not ignore case.               -R or --RAW-CONTROL-CHARS        Like -r, but only ANSI "color" escape        sequences and OSC 8 hyperlink sequences        are output in "raw" form. Unlike -r,        the screen appearance is maintained cor-        rectly, provided that there are no es-        cape sequences in the file other than        these types of escape sequences. Color        escape sequences are only supported when        the color is changed within one line,        not across lines. In other words, the        beginning of each line is assumed to be        normal (non-colored), regardless of any        escape sequences in previous lines. For        the purpose of keeping track of screen        appearance, these escape sequences are        assumed to not move the cursor.               OSC 8 hyperlinks are sequences of the        form:               ESC ] 8 ; ... \7               The terminating sequence may be either a        BEL character (\7) or the two-character        sequence "ESC \".               ANSI color escape sequences are se-        quences of the form:               ESC [ ... m               where the "..." is zero or more color        specification characters. You can make        less think that characters other than        "m" can end ANSI color escape sequences        by setting the environment variable        LESSANSIENDCHARS to the list of charac-        ters which can end a color escape se-        quence. And you can make less think        that characters other than the standard        ones may appear between the ESC and the        m by setting the environment variable        LESSANSIMIDCHARS to the list of charac-        ters which can appear.               -r or --raw-control-chars        Causes "raw" control characters to be        displayed. The default is to display        control characters using the caret nota-        tion; for example, a control-A (octal        001) is displayed as "^A" (with some ex-        ceptions as described under the -U op-        tion). Warning: when the -r option is        used, less cannot keep track of the ac-        tual appearance of the screen (since        this depends on how the screen responds        to each type of control character).        Thus, various display problems may re-        sult, such as long lines being split in        the wrong place.               USE OF THE -r OPTION IS NOT RECOMMENDED.                     --       Cheers, Carlos.              --- SoupGate-DOS v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca