Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Running additional shell startup commands
- X-seq: zsh-users 20368
- From: lilydjwg <lilydjwg@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: Running additional shell startup commands
- Date: Thu, 30 Jul 2015 15:49:02 +0800
- Disposition-notification-to: lilydjwg@xxxxxxxxx
- 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==
- 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>
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 <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
> [...]
I would use this for that:
ssh -t host 'sh -c "cd ~/src/git && exec zsh -l"'
--
Best regards,
lilydjwg
Messages sorted by:
Reverse Date,
Date,
Thread,
Author