Cleaning up code of 'lh' short helper.

This commit is contained in:
Daniel Baumann 2008-11-02 11:29:09 +01:00
parent c225229f29
commit 8ff4391fd7
1 changed files with 5 additions and 2 deletions
helpers

View File

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