From 8ff4391fd7f2a89c3ae39cec097a28dc6b2e768b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 2 Nov 2008 11:29:09 +0100 Subject: Cleaning up code of 'lh' short helper. --- helpers/lh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/helpers/lh b/helpers/lh index 5f2b538..5d3e59c 100755 --- a/helpers/lh +++ b/helpers/lh @@ -48,9 +48,12 @@ case "${1}" in ;; *) - if [ ! -z "$(whereis lh_${1})" ] + COMMAND="${1}" + shift + + if [ -x "$(which lh_${COMMAND} 2>/dev/null)" ] then - exec lh_"${1}" $(echo ${@} | sed -e "s|${1}||") + exec lh_"${COMMAND}" ${@} else Echo_error "no such helper" exit 1 -- cgit v1.0