From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3687 invoked by alias); 30 Jul 2015 06:34:37 -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: 20366 Received: (qmail 28819 invoked from network); 30 Jul 2015 06:34:35 -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: d06dlp01.portsmouth.uk.ibm.com X-MailFrom: vogt@linux.vnet.ibm.com X-RcptTo: zsh-users@zsh.org Date: Thu, 30 Jul 2015 07:24:19 +0100 From: Dominik Vogt To: Zsh Users Subject: Running additional shell startup commands Message-ID: <20150730062419.GA9760@linux.vnet.ibm.com> Reply-To: vogt@linux.vnet.ibm.com Mail-Followup-To: Zsh Users MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15073006-0041-0000-0000-00000518B9B7 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