This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
dotfiles/bin/vman

16 lines
406 B
Text
Raw Normal View History

2018-11-08 07:32:36 -06:00
#!/usr/bin/env bash
# our vim config is setup to not auto-load sessions if we set the
# `asmanviewer` variable, so launch vim that way when using vim as our man
# page viewer
if command -v nvim >/dev/null 2>&1; then
nvim --cmd "let asmanviewer=1" -c "SuperMan $*"
else
vim --cmd "let asmanviewer=1" -c "SuperMan $*"
fi
# proper error handling
if [ "$?" != "0" ]; then
echo "No manual entry for $*"
fi