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

Re: Bug#468386: zsh-beta: Slow command completion



On Mar 2,  4:46pm, Clint Adams wrote:
} Subject: Re: Bug#468386: zsh-beta: Slow command completion
}
} On Sun, Mar 02, 2008 at 12:52:08PM -0800, Bart Schaefer wrote:
} > What does "whatis --version" say on Debian?
} 
} whatis 2.5.1
} 
} 2.5.1 is the version of man-db whence whatis comes.

Right.  On my RHEL system it says:

whatis from man-1.5o1

I should have asked before, but does Debian have "apropos"?

I'm trying to figure out the best incarnation of something like this:

  _call_whatis() {
    case "$(whatis --version)" in
    (whatis from *)
      local -A args
      zparseopts -D -A args s: r:
      apropos "${args[-r]:-"$@"}" | fgrep "($args[-s]"
      ;;
    (*) whatis "$@";;
    esac
  }

It might be better to test for existence of apropos than to try to
parse the output of whatis --version.  Or it might not.



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