(patch for Bash) dynamically loadable builtins
William Park
opengeometry-FFYn/CNdgSA at public.gmane.org
Sun Aug 29 22:04:45 UTC 2004
Dear all,
Latest incarnation of my patch is now at
http://freshmeat.net/projects/bashdiff/
By popular demands, I converted all builtins as dynamically loadables.
And, simple x-y character plot has been added since last post.
I personally don't like putting builtins in a separate shared object
file. But, it allows people to try my patch, without compiling the
entire Bash shell from scratch.
To compile just the loadables,
wget ftp://ftp.gnu.org/pub/gnu/bash/bash-3.0.tar.gz # original
tar -xzf bash-3.0.tar.gz
mv bash-3.0 bash
wget http://home.eol.ca/~parkw/bashdiff.tar.gz # my patch
tar -xzf bashdiff.tar.gz
cd bash
patch -p1 < ../bash.diff
autoconf
./configure # to pickup headers and libraries.
cd examples/loadables/william
make # --> william.so
To find out what is available,
nm -D ./william.so | grep '_struct'
where 'xxx_struct' denotes that 'xxx' builtin is available for dynamic
loading. If you have all libraries, then you should see 24 builtins.
To use it,
enable -f ./william.so vplot # loads 'vplot' as builtins
help vplot
vplot
vplot 1 2 3 4 5 6
enable -d vplot # unloads 'vplot'
Any feedback (like segfault :-) is greatly appreciated. Enjoy!
--
William Park <opengeometry-FFYn/CNdgSA at public.gmane.org>
Open Geometry Consulting, Toronto, Canada
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list