Index: mttroot/mtt/bin/mtt_help ================================================================== --- mttroot/mtt/bin/mtt_help +++ mttroot/mtt/bin/mtt_help @@ -12,10 +12,13 @@ ############################################################### ## Version control history ############################################################### ## $Id$ ## $Log$ +## Revision 1.11 1998/07/16 20:41:05 peterg +## Now uses new mtt_help +## ## Revision 1.10 1998/05/18 08:35:19 peterg ## Surround arguments to tr with "" ## ## Revision 1.9 1998/03/26 08:23:02 peterg ## Use mixed case Topic for *) part of case sttement @@ -47,10 +50,16 @@ ## ############################################################### Topic=$1 topic=`echo $Topic | tr "[A-Z]" "[a-z]"` + +if [ -n "$2" ]; then + regexp=$2; +else + regexp='^'; +fi if [ "$topic" = "" ]; then echo 'Usage: mtt help representations' echo ' mtt help components' echo ' mtt help examples' @@ -91,11 +100,11 @@ sort='sort -u' blurb="Examples";; representations) key=$summary - find_path=$MTTPATH/mtt + find_path=$MTTPATH name='mtt' all='all' sort='sort -u' blurb="Representations";; @@ -117,13 +126,13 @@ echo $blurb mtt_find $find_path "$name" |\ awk '{print "cat " $1 "/" $2}' | sh |\ - egrep $key |\ + egrep $key | egrep $regexp |\ sed "s/$summary[ ]*//" |\ sed "s/$description[ ]*/ /" |\ sed "s/$alias[ ]*/ Alias: /" |\ sed "s!$find_path/!!" |\ $sort