Def is dict with bat or less

This commit is contained in:
z3rOR0ne 2022-11-29 02:26:19 -08:00
parent fd0295591a
commit 4db7199835
2 changed files with 15 additions and 1 deletions

14
scripts/def Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
#
main() {
if ! command -v bat &> /dev/null ; then
/usr/bin/dict "${1}" | less
else
/usr/bin/dict "${1}" | bat
fi
}
main "$@"