From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10465 invoked by alias); 30 Jul 2015 07:49:44 -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: 20368 Received: (qmail 11088 invoked from network); 30 Jul 2015 07:49:43 -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=date:from:to:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to :disposition-notification-to:user-agent; bh=N6dEmKcylemVld8wS+FvVLgg9lQUcCiwka1q86vMHU8=; b=rVNivxfcNTiObfBB14kAk7hi98K7QIl4AAIYv3cGu6ZV6nWcMaxPVzGLSKg2W99qiL 0EAbc2QQhwQTuQqn+bG3UUV2LijKsLYe6B4dU0FRXw7pGkqCp76bZa9wDEqrVMoNVNqA QpnzjEJQTxBjlt1YVGM2v8aLA2u3GZK9Le1ltrBtBwWp3nYGLPxfZbQQepRl9o7jkbTN xeISKkd8T3E4mAmJ+Ozu5DV4jVlXl8WBwoGyaT0eX6QnktXADONOhKUiTbSOJ8RuVcPM xfHOfdWBVoengu73zhpEyIBDI7exqayEqwArZ4Gd+g7jj+oHatIsQKrPRGeex2ETdRRS 1sxQ== X-Received: by 10.66.55.66 with SMTP id q2mr102901114pap.94.1438242579541; Thu, 30 Jul 2015 00:49:39 -0700 (PDT) Date: Thu, 30 Jul 2015 15:49:02 +0800 From: lilydjwg To: zsh-users@zsh.org Subject: Re: Running additional shell startup commands Message-ID: <20150730074902.GA16612@lilyforest> References: <20150730062419.GA9760@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150730062419.GA9760@linux.vnet.ibm.com> User-Agent: Mutt/1.5.23+102 (2ca89bed6448) (2014-03-12) On Thu, Jul 30, 2015 at 07:24:19AM +0100, 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 > [...] I would use this for that: ssh -t host 'sh -c "cd ~/src/git && exec zsh -l"' -- Best regards, lilydjwg