Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Running additional shell startup commands
- X-seq: zsh-users 20367
- From: Mateusz Karbowy <mateusz.karbowy@xxxxxxxxx>
- To: vogt@xxxxxxxxxxxxxxxxxx, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Running additional shell startup commands
- Date: Thu, 30 Jul 2015 08:45:00 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=5W3Qv6KmEW+yeep2ZNDXRx2SnGpHBMC/FO84ewVZkSo=; b=aop69trHoezYKDLR/K7is9fx9FS3M8HWJ6uYFrXIrOGK2Swd69MeRMAeK1gO/cGWYz gf1z5VizlgOZ8l87qGMzY2UEYuGaer3JGNYWvpI8kRqntmEPamIFKSk3VGL9iTHUL41j +AaSpKnEYFTa6K4okhqYVi2awPydRM6HdfVPATkHxPFWQ9dBoYYVoxzDnr74S+AeP/bx 3GLB30AA/lcluZZc0+CkxizqD9VaP9PoSPzaYXWjY6kwyMw7sytvJM2B4AL0wzySdmJQ FKTdgU4lMHBI//jDUVXpoc+kXJ5hHRAsbu4B3VGkkOEpTRhjC1H8fyf1UJ73Hxxt5+RN Pweg==
- In-reply-to: <20150730062419.GA9760@linux.vnet.ibm.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20150730062419.GA9760@linux.vnet.ibm.com>
http://serverfault.com/questions/167416/change-directory-automatically-on-ssh-login
On 30 July 2015 at 07:24, Dominik Vogt <vogt@xxxxxxxxxxxxxxxxxx> wrote:
> Often, I ssh to another machine, and the first thing I do there is
> to change the working directory, e.g.
>
> $ ssh <some machine>
> $ cd ~/src/git/...
>
> I'm looking for a way to specify that in some way on the ssh
> command line but cannot figure out how to do that. Zsh takes
> either input from stdin, or from a command specified with -c, or
> from a script, so things like
>
> $ ssh <...> zsh -c 'cd ~/src/git' -s
>
> or
>
> $ ssh <...> zsh -s <script>
>
> don't work. The only thing I can think of would be to copy a
> script to the machine with scp and source that at shell startup,
> but that is way too much bother and too limited in application to
> be useful (works only if the config on the target machine is
> changed).
>
> (Is there a good reason why -s cannot be combined with -c or a
> script name anyway?)
>
> Ciao
>
> Dominik ^_^ ^_^
>
> --
>
> Dominik Vogt
> IBM Germany
>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author