Am I connected remotely?
- Comments:
- here.
I now share my dotfiles between the various OS X machines I use daily, using Dropbox and symlinks.
However, I have many aliases and functions that need to act differently if I only have a console session at the machine in question, or a full GUI session.
With bash, this is easy to test:
|
|
Now, if I am remotely connected to a machine, then I will get nano as my editor, but if I am sitting directly in front of it, then it will open Textmate.