Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: conflict of "exec zsh" with scp
- X-seq: zsh-users 12405
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: ZSH User List <zsh-users@xxxxxxxxxx>
- Subject: Re: conflict of "exec zsh" with scp
- Date: Wed, 9 Jan 2008 18:05:42 +0100
- In-reply-to: <080108233407.ZM6480@xxxxxxxxxxxxxxxxxxxxxx> <080108210151.ZM6361@xxxxxxxxxxxxxxxxxxxxxx> <47841108.4020903@xxxxxxxxxxxxx>
- Kreccount: 1
- Mail-followup-to: ZSH User List <zsh-users@xxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20080108220102.GB20640@xxxxxxxxx> <080108210151.ZM6361@xxxxxxxxxxxxxxxxxxxxxx> <080108233407.ZM6480@xxxxxxxxxxxxxxxxxxxxxx> <20080108220102.GB20640@xxxxxxxxx> <080108210151.ZM6361@xxxxxxxxxxxxxxxxxxxxxx> <20080108220102.GB20640@xxxxxxxxx> <47841108.4020903@xxxxxxxxxxxxx>
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