From: Alfie Costa (agcosta@gis.net)
Date: Fri Mar 03 2000 - 20:24:07 CET
More script stuff...
While searching usenet for information on how /bin/ash's case//esac expressions
work, I ran into a 'type' script for ash:
http://www.deja.com/=dnc/[ST_rn=ps]/getdoc.xp?AN=176411807
Adapting that to mu was much easier than studying ash, and so here it is...
Notes: the original script off of usenet was designed as a function, but I
wasn't sure where global mu functions should go, so I made it a plain old
script. Really it's better as a function, because a subshelled script doesn't
necessarily get all their parent shell's functions. Example, if you have mu's
pushd() and popd() functions loaded, this 'type' script won't detect them.
Nevertheless, this here script is so coded that a wrapper function like:
type_function() # this should be named just 'type' of course
{
. /bin/type_script # but maybe this script should not be named 'type',
} # to avoid confusion?
...will behave as it should; that is, it will see pushd() and popd() -- and
consume less RAM too.
All of which presumes that 'type' is a useful command worth having. Comments,
bugs, lawsuits welcome...
The following section of this message contains a file attachment
prepared for transmission using the Internet MIME message format.
If you are using Pegasus Mail, or any another MIME-compliant system,
you should be able to save it or view it from within your mailer.
If you cannot, please ask your system administrator for assistance.
---- File information -----------
File: Type
Date: 3 Mar 2000, 13:46
Size: 1142 bytes.
Type: Unknown
---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk
This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:13 CET