open config file in local EDITOR, if user is connected via SSH#30
open config file in local EDITOR, if user is connected via SSH#30kriskbx merged 1 commit intokriskbx:masterfrom
Conversation
|
Very good point. I was aware of that but postponed any work on this because I never used gtt remotely. Thank you so much for your contribution! I'm thinking about going one step further and completely removing the SSH_CLIENT and SSH_TTY check as well as the |
|
Sounds good, also the node-open package seems to be unmaintained, one more point for dropping it. Another suggestion would be to check for $VISUAL first, and then $EDITOR. That would prefer gui editors if such variable is set (https://unix.stackexchange.com/questions/4859/visual-vs-editor-whats-the-difference). |
|
Good point. I'll keep the |
I am always working remotely on a linux server machine.
Thus, opening via the node-open doesn't work, the "gtt config" will never return.
When I am using
xdb-open path-to-config.js(what the node-open package does under the hood), I am getting these messags:AFAIK the whole xdg stuff is for GUI apps/multi terminal environments. For a terminal application, i would expect it to open in the EDITOR environment variable, like
git commitdoes.The proposed change checks the environment for known SSH variables (1). If those and the EDITOR is found, that is launched instead.