> Does a shell exist that does the following???
> I need a shell which will allow 'cd' while inside the user's home
> directory but will not allow a cd (or chroot) outside of their directory.
% trap '[[ $PWD = $HOME* ]] || cd -' DEBUG
Which would cd back to the previous directory before executing any
commands if the current directory is outside of the home dir. But of
course that wouldn't stop a sophisticated user from removing the trap.
It's possible you could find a way to cause the trap to be set as part
of evaluating PS1, in which case you could then make PS1 read only
("readonly PS1") and prevent the user from unsetting the trap that way,
but I haven't tried it