C: get name of current shell terminal

Discussion in 'Mac Programming' started by moonman239, Dec 9, 2015.

  1. moonman239 macrumors 68000

    Joined:
    Mar 27, 2009
    #1
    I have a C program that outputs a color code that bash understands perfectly well but other terminals may not. The idea, then, would be to have my program color the string according to the rules of the terminal running the program. If it is running in "bash", it will output the string I have so far; if not, and there are no other supported terminals, the program will output a plain string.
     
  2. cqexbesd macrumors regular

    Joined:
    Jun 4, 2009
    #3

Share This Page