Fix: bash function man

This commit is contained in:
Akemi Izuko 2023-01-14 21:50:50 -07:00
parent 4add7c2701
commit 98f07f8d13
No known key found for this signature in database
GPG key ID: 905D444F6A5E4BE4

View file

@ -55,7 +55,7 @@ sww() {
# Proper manpages =================================================== # Proper manpages ===================================================
man() { man() {
local command="$1" local command=$(IFS=-, ; echo "$*")
if [[ "$command" =~ \. ]]; then if [[ "$command" =~ \. ]]; then
~/.configs_pointer/bin/man_py.sh "$command" ~/.configs_pointer/bin/man_py.sh "$command"
@ -63,6 +63,8 @@ man() {
/usr/bin/man "$command" /usr/bin/man "$command"
elif command -v "$command" &>/dev/null; then elif command -v "$command" &>/dev/null; then
"$command" --help | nvim -R -c 'set syn=man' -- "$command" --help | nvim -R -c 'set syn=man' --
elif command -v "$@" &>/dev/null; then
"$@" --help | nvim -R -c 'set syn=man' --
else else
echo "Error: No man page for \`$command\`" echo "Error: No man page for \`$command\`"
fi fi