dotfiles

<-- duh.
git clone https://hhvn.uk/dotfiles
git clone git://hhvn.uk/dotfiles
Log | Files | Refs | Submodules | LICENSE

pman (306B)


      1 #!/bin/sh
      2 
      3 mandir="/usr/share/man"
      4 
      5 section=$(man -k "$1" 2>/dev/null | tr '()' '+' | grep "^$1[,+]" | awk -F, '{print $NF}' | grep -o '+[0-9]*p*+' | tr -d '+')
      6 
      7 [ "$section" = "" ] && echo "No such man page" && exit
      8 
      9 [ -f $mandir/man${section}p/$1.${section}p ] && man ${section}p $1 || man ${section} $1