Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

interact



Can we make a zsh script define some functions, some varables, etc..
and then give control over to the user as a usual interactive shell
(except with those functions, etc just defined)?

This is a bit like the interact command in the expect pacakge.

At the moment I do this by setting the ZDOTDIR varaible to a
directory containing the required definitions in the .zshrc file
and then run zsh... ie.

----------------------------------
#! /bin/sh

ZDOTDIR=/what/ever/path/the/zshrc/is/in
export ZDOTDIR

# most of the work is done in the .zshrc.

# now interact with the user....
exec zsh

-------------------------------

But this is ungraceful and I'd like to do this 'properly'.

If this can't be done is there support enough for me to attempt
to add an 'interact' keyword and associated code.


			Thanks, Anthony.



Messages sorted by: Reverse Date, Date, Thread, Author