Using sqsh, in my .sqshrc, I can have an alias to connect to a production server, and an alias to change my colors:
\alias prod='\reconnect -S MY_PROD_DS ...'
\alias pc='\set prompt="{0;47;34} [$histnum] ${DSQUERY}.${database}.${lineno}> "'
How can I have one alias that does both?
I don't think it is possible to have 2 or more commands in one alias. The best way to specify a server dependent prompt is to set it in the session file that is being evaluated just before setting up a new connection to the server. In your .sqshrc file you can specify the session file and prompt definition, for example:
In this session file you then can do something like:
When you connect or reconnect to the MY_PROD_DS server you get a red on white color prompt, otherwise a blue on white prompt.