I don't think it's going to be a hugely important feature, but I don't see a problem with creating a new option (-C seems fine) which would have the same effect as if the arguments were contatenated into a file which is then used with -f. IIRC -c has some special characteristics which means it's probably best not to try to extend it for this feature.
ok, I'll try to write patch.
I have a question. Can be -C option multiple?
The SQL is without problem, but what about \x command?
postgres=# \dt \dn select 10; No relations found. List of schemas ┌──────┬───────┐ │ Name │ Owner │ ╞══════╪═══════╡ └──────┴───────┘ (0 rows)
\dn: extra argument "10;" ignored
some like
psql -C "\dt \dn" -C "select 10"
It is looking better than psql -c "\dt \dn \n select 10"