Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Running additional shell startup commands



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

or

  $ ssh <...> zsh -s <script>

don't work.  The only thing I can think of would be to copy a
script to the machine with scp and source that at shell startup,
but that is way too much bother and too limited in application to
be useful (works only if the config on the target machine is
changed).

(Is there a good reason why -s cannot be combined with -c or a
script name anyway?)

Ciao

Dominik ^_^  ^_^

-- 

Dominik Vogt
IBM Germany



Messages sorted by: Reverse Date, Date, Thread, Author