For example, if I want the prefix for bold green, I might do Green=$(tput bold; tput setaf 2). This would set $Green to "\E[1m\E[32m". But on an Ansi terminal, it could just as easily have been "\E[1;32m".
Can this be done with tput, or am I asking too much?
ACCEPTED]
No, tput won't do this (normally) because you're likely to use only the predefined/standard terminal capabilities, which don't have that combination.
With ncurses, you could define your own terminal description with a user-defined capability, and tput would work with that.
Something like this would combine colors:
infocmp -x >foo
printf '\tfgbg=\\E[3%p1%;4%p2%dm,\n' >>foo
sudo tic -x foo
Then (the example is for 8-colors)
tput fgbg 4 0
would set the foreground to blue and background to black. However, there are a lot of possibilities. Using the predefined capabilities involves less effort.
Another way to look at this is that knowing that you even can combine control sequences in this way is a terminal-family-specific thing, which is not the termcap/terminfo model. Whilst the 44-year-old ECMA-48 model for control sequences is widespread nowadays, termcap/terminfo are designed to allow for terminal types that do not adhere to it. It is not the case that one actually can always combine control sequences in this way.