Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: How to link to zsh manual section?



İsmail Dönmez wrote on Wed, Feb 11, 2015 at 14:50:14 +0200:
> On Wed, Feb 11, 2015 at 2:47 PM, René Neumann <lists@xxxxxxxxx> wrote:
> > Am 11.02.2015 um 13:26 schrieb İsmail Dönmez:
> >> Hi,
> >>
> >> On Mon, Feb 9, 2015 at 3:52 PM, René Neumann <lists@xxxxxxxxx> wrote:
> >>> Am 08.02.2015 um 19:46 schrieb Christian Neukirchen:
> >>>> zzapper <david@xxxxxxxxxxxxxx> writes:
> >>>>
> >>>>> A few tips on negotiating the zsh manuals please
> >>>>>
> >>>>> man zshall etc
> >>>>
> >>>> # zman -- easier browsing of zsh manpage
> >>>> # 20sep2011  +chris+
> >>>> zman() {
> >>>>   PAGER="less -g -s '+/^       "$1"'" man zshall
> >>>> }
> >>>>
> >>>> In doubt, press "n" a few times for the next results.
> >>>>
> >>>
> >>> Nice idea! One could enhance it a little (depending on one's preference,
> >>> of course) by inserting (?i) into the search string, resulting in
> >>> case-independent search.
> >>>
> >>> -> PAGER="less -g -s '+/(?i)^       "$1"'" man zshall
> >>
> >> This gives an "Invalid pattern" error here.
> >

Try adding the -i flag to the 'less' invocation, and removing the (?i).

> > Hmm, is your installation of 'less' using a regex library other than
> > pcre? (Because the less manpage says, that the regex may be anything the
> > underlying lib supports, and with libpcre-8.35 this works)
> 
> That explains it, mine is not linking to pcre. However looks like even
> without ?i syntax it works case-independent.

Usually, less is case-sensitive unless the -i command-line flag is
passed (or applied interactively).

Daniel



Messages sorted by: Reverse Date, Date, Thread, Author