2024-03-01 11:46:09 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
mkdir -p ${HOME}/.local/tmp
|
|
|
|
dict -h localhost -d gcide "$@" > ${HOME}/.local/tmp/"${1}".txt 2>&1
|
|
|
|
content=$(cat ${HOME}/.local/tmp/"${1}".txt);
|
|
|
|
rm ${HOME}/.local/tmp/${1}.txt
|
|
|
|
|
|
|
|
|
|
|
|
if [[ "${content}" == *"No definitions found"* ]]; then
|
|
|
|
#./cecho IYellow On_Blue "$(cat ${HOME}/.local/tmp/${1}.txt)"
|
2024-03-01 11:53:43 +00:00
|
|
|
cecho IYellow On_Black "${content%%*( )}"
|
2024-03-01 11:46:09 +00:00
|
|
|
else
|
|
|
|
#./cecho Black On_White "$(cat ${HOME}/.local/tmp/${1}.txt)"
|
2024-03-01 11:53:43 +00:00
|
|
|
cecho IWhite On_Black "${content%%*()}"
|
2024-03-01 11:46:09 +00:00
|
|
|
fi
|
|
|
|
|