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

PATCH: Re: _man copes with : delimited manpath



Adam Spiers wrote:
> On my system, `manpath' generates colon-delimited paths, rather than
> space-delimited ones.  This patch solves that problem.  It also fixes
> what I think is a typo, but someone should check this.

Sorry, I wasn't thinking properly when I wrote it - all manpath commands I can find return a colon delimited string.

I prefered the more succinct way it was done so I'd suggest the following patch. An alternative would be to assign to MANPATH instead of manpath.

Oliver Kiddle

*** Completion/User/_man.bak	Wed Oct  6 17:09:43 1999
--- Completion/User/_man	Wed Oct  6 17:09:58 1999
***************
*** 14,25 ****
    approx="(#a${_comp_correct})"
  fi
  
! (( $#manpath )) || manpath=$(manpath 2>/dev/null) ||
    manpath=( /usr/man(-/N) /(opt|usr)/(dt|share|X11R6|local)/(cat|)man(-/N) )
  
  # `sman' is the SGML manual directory for Solaris 7.
  
! if [[ $words[2] = (<->*|ln) ]]; then
    rep=(
    $manpath/(sman|man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
  else
--- 14,25 ----
    approx="(#a${_comp_correct})"
  fi
  
! (( $#manpath )) || manpath=( ${(s.:.)$(manpath 2>/dev/null)} ) ||
    manpath=( /usr/man(-/N) /(opt|usr)/(dt|share|X11R6|local)/(cat|)man(-/N) )
  
  # `sman' is the SGML manual directory for Solaris 7.
  
! if [[ $words[2] = (<->*|l|n) ]]; then
    rep=(
    $manpath/(sman|man|cat)${words[2]}/${~approx}$PREFIX${~star}$SUFFIX.<->*(N:t) )
  else



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