0

I am used to my osascript aliases. In particular, I have nx for opening new tab and closing the old one.

However, my scripts use application name to send keyboard signals to it. Instead of writing it all many times i use my own variable term that contains terminal application name (it is always term=iTerm, no matter what terminal I'm using).

How do I fetch the terminal emulator's name I am entering command line with?

3

TERM_PROGRAM is set by both Terminal and iTerm:

TERM_PROGRAM=iTerm.app
TERM_PROGRAM=Apple_Terminal

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .