From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25136 invoked by alias); 30 Jul 2015 08:06:06 -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: 20369 Received: (qmail 1379 invoked from network); 30 Jul 2015 08:06:01 -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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 X-Helo: d06dlp03.portsmouth.uk.ibm.com X-MailFrom: vogt@linux.vnet.ibm.com X-RcptTo: zsh-users@zsh.org Date: Thu, 30 Jul 2015 08:55:45 +0100 From: Dominik Vogt To: Zsh Users Subject: Re: Running additional shell startup commands Message-ID: <20150730075545.GA21220@linux.vnet.ibm.com> Reply-To: vogt@linux.vnet.ibm.com Mail-Followup-To: Zsh Users References: <20150730062419.GA9760@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15073007-0017-0000-0000-000004E63DCB > 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