From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29224 invoked by alias); 30 Jul 2015 07:45:07 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 20367 Received: (qmail 15326 invoked from network); 30 Jul 2015 07:45:05 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 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== MIME-Version: 1.0 X-Received: by 10.55.41.21 with SMTP id p21mr54029996qkh.11.1438242300500; Thu, 30 Jul 2015 00:45:00 -0700 (PDT) In-Reply-To: <20150730062419.GA9760@linux.vnet.ibm.com> References: <20150730062419.GA9760@linux.vnet.ibm.com> Date: Thu, 30 Jul 2015 08:45:00 +0100 Message-ID: Subject: Re: Running additional shell startup commands From: Mateusz Karbowy To: vogt@linux.vnet.ibm.com, Zsh Users Content-Type: text/plain; charset=UTF-8 http://serverfault.com/questions/167416/change-directory-automatically-on-ssh-login On 30 July 2015 at 07:24, Dominik Vogt wrote: > Often, I ssh to another machine, and the first thing I do there is > to change the working directory, e.g. > > $ ssh > $ 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