rkitover/vimpager — pull request #54 by justinkb (2012-12-26 01:59:29+00:00)
Title: Filetype setting for man pages on FreeBSD

On FreeBSD /usr/bin/man is a shell script, not a binary. Due to the hashbang it iss executed by /bin/sh, which hinders setting the filetype, due to the way the pstree is used for this.

This is the cleanest way I could think of to fix this. Pretty straightforward patch, adds awk_pstree_freebsd function with additional fourth argument (the first argument to the command) and basically checks for "/bin/sh /usr/bin/man".