diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2020-12-04 18:14:35 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2020-12-04 18:14:35 -0300 |
commit | 81a004961db88d74b01dab2ef723b54d1c10d1e5 (patch) | |
tree | 524e062aaecdbf16fa78c562c8ba143ed395a458 | |
parent | e55f604ff9da09502860bfc243936b7c303c086f (diff) | |
download | scripts-81a004961db88d74b01dab2ef723b54d1c10d1e5.tar.gz scripts-81a004961db88d74b01dab2ef723b54d1c10d1e5.tar.bz2 |
Feat: dict wrapper
-rwxr-xr-x | dict | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -0,0 +1,20 @@ +#!/bin/bash +# +# Dictionary wrapper. +# + +# Parameters +BASENAME="`basename $0`" +DICT="/usr/bin/dict" + +# Dispatch +if [ -x "$DICT" ]; then + $DICT "$@" +else + if which surfraw &> /dev/null; then + surfraw wiktionary "$@" + else + echo "error: no suitable dictionary found in the system" + exit 1 + fi +fi |