I need to use plural commands sequence frequently, like:
xelatex a-tex-file.tex && xelatex a-tex-file.tex
to create a latex catalog. Or:
dot -Tpdf -o a-dot-file{.pdf,.dot} && evince a-dot-file.pdf
to view a pdf file after being compiled immediately to check if I correctly modify the graph file described by dot language. And so on.
To prevent clerical error I want to use repeated command line parts(such as filename) by any possible ways, a bit like:
xelatex a-tex-file.tex && xelatex $2
and maybe
dot -Tpdf -o a-dot-file.pdf ${3%.*}.dot && evince $3
Maybe set (positional) variables or make a script can get it but I hope it can change the environment as less as possible, and I don't think it is sensible to make scripts for every command permutation, or set/unset variable on every time.
So is there any way to use repeated command line parts in just current command line more "temporarily" in various shells?