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

View file

@ -48,8 +48,8 @@ alias lshw="doas lshw -short | less" # list hardware
alias {hw,hwinfo}="hwinfo | less" # extensive info on hardware devices
alias dmid="doas dmidecode | less"
alias of="onefetch -o yaml | yq -C"
alias dict="$HOME/scripts/dict"
alias mkdir='mkdir -pv'
alias dict='def'
alias {ex,esc}="exit"
alias {his,hist}="history"
alias mnt="doas mount /dev/sda1 /mnt/media/usb-drive"

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 "$@"