A loop with eval, like this:
coolcommand () { while IFS= read -rep "> $1 " line; do eval "$1 $line"; done; }
Then invoke coolcommand firewall-cmd like in your example.
Note firewall-cmd gets "glued" to the beginning of every line you type, but it's still the shell who evaluates the resulting string. So $, *, ;, #, quotes or such are still special. In particular after coolcommand firewall-cmd, typing --list-all; date will run firewall-cmd --list-all and date (not firewall-cmd date).
Improvements for better experience:
It's possible to pass a command with argument(s) as well. Example:
coolcommand 'printf "foo %s\n"'
The same as a script. Added history support:
#!/bin/bash
unset HISTFILE
HISTCONTROL=ignoreboth
while IFS= read -rep "> $1 " line; do
history -s "$line"
eval "$1 $line"
done
The history is not saved when the script is about to exit, still during a single invocation it should work (↑/↓ like normally in Bash).