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

Re: conflict of "exec zsh" with scp



Casper wrote:
> Why don't you just chsh (man chsh) on your host instead of
> doing .bashrc trickery? You all share the same shell account
> on a single host?
Yes, I was talking about a "shared" admin and/or root account.

Bart wrote: 
> The first thing I'd try is changing from
> 	exec zsh -l
> to
> 	exec zsh -$- "$@"
Good idea, thanks!
But apparently that's not enough:
 lama:~>scp admin@otherhost:/etc/passwd .
 zsh: string expected after -c
 [1]    31295 exit 1     scp -C admin@otherhost:/etc/passwd .


> However, if want you really want is to NOT exec zsh for scp, then it may
> be sufficient to change the test to:
>
> 	[[ ! -t 0 && "$REALUSER" == "Andy Spiegl" ]]
Without the "!" it works.

> Alternately, to implement Casper's suggestion:
> [[ "$-" == *i* && "$REALUSER" == "Andy Spiegl" ]]
Works, too, thanks a lot!

But why did you mention whether I really don't want to use zsh for scp?
Is there any disadvantage?  Actually I don't care as long as it works
as expected. :-)  But of course I'd prefer using zsh instead of bash
as I do when using my personal accounts, too.

Thanks,
 Andy.

-- 
 Unable to locate coffee, operator halted



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