Def is dict with bat or less
This commit is contained in:
parent
fd0295591a
commit
4db7199835
2 changed files with 15 additions and 1 deletions
14
scripts/def
Executable file
14
scripts/def
Executable 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 "$@"
|
||||
Loading…
Add table
Add a link
Reference in a new issue