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
2
aliases
2
aliases
|
|
@ -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
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