Fix: bash function man
This commit is contained in:
parent
4add7c2701
commit
98f07f8d13
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue