In .ssh/config, could you use SendEnv? It does sound like something that should be specific to your setup.
SendEnv MYVAR Specifies what variables from the local environ(7) should be sent to the server. The server must also support it, and the server must be configured to accept these environment vari‐ ables. Note that the TERM environment variable is always sent whenever a pseudo-terminal is requested as it is required by the protocol. Refer to AcceptEnv in sshd_config(5) for how to configure the server. Variables are specified by name, which may contain wildcard characters. Multiple environment variables may be separated by whitespace or spread across multiple SendEnv directives. The default is not to send any environment variables. On 12/06/2016 11:03 AM, René J.V. Bertin wrote: > Has there ever been discussion about if and how to let `port edit` invoke a > different editor when you're working locally vs. over SSH? > > I realise this could theoretically be handled by setting a different > MP_EDITOR value in your shell's .*profile/.*rc file but I cannot think of a > reliable way to detect local vs. remote access right now, esp. not one that > will distinguish between local "aqua vs non aqua" sessions. And to make > things yet more complex: ssh to a remote host and from there back to a Mac, > all from within an Aqua session, and you can still do things like `open -e` > to edit a file in TextEdit.