Update: universal man pages

This commit is contained in:
Akemi Izuko 2023-01-14 19:25:38 -07:00
parent 30d7559298
commit aa796e7523
No known key found for this signature in database
GPG key ID: 905D444F6A5E4BE4

View file

@ -53,6 +53,21 @@ sww() {
fi
}
# Proper manpages ===================================================
man() {
local command="$1"
if [[ "$command" =~ \. ]]; then
~/.configs_pointer/bin/man_py.sh "$command"
elif /usr/bin/man "$command" >/dev/null 2>&1; then
/usr/bin/man "$command"
elif command -v "$command" &>/dev/null; then
"$command" --help | nvim -R -c 'set syn=man' --
else
echo "Error: No man page for \`$command\`"
fi
}
complete -W "console mac pc standard fn small mini" sww
# Open command source code ==========================================