How do I add a flag to an alias? Is it possible to add a flag to a bash alias you create yourself? e.g.

con -a = 'ssh username@server1.domain.com'
con -b = 'ssh username@server2.domain.com'
Or, use a function instead of an alias:

con() {
  local OPTIND svr
  while getopts ":ab" option; do
    case $option in
      a) svr=server1 ;;
      b) svr=server2 ;;
      ?) echo "invalid option: $OPTARG"; return 1 ;;
    esac
  done
  ssh username@${svr}.domain.com
}

con -a