I know it for one command but how to work with a sequence?
How to create an alias for a sequence of commands?
shell;alias
I put this as an answer, because cannot format it in the comment properlyfoo() {   echo foo   echo bar}> foofoobarImho, you have more freedom with a function than with alias. At least you can format it properly.Advanced Bash-Scripting GuideIn a script, aliases have very limited usefulness. It would be nice if aliases could assume some of the functionality of the C preprocessor, such as macro expansion, but unfortunately Bash does not expand arguments within the alias body. [2] Moreover, a script fails to expand an alias itself within compound constructs, such as if/then statements, loops, and functions. An added limitation is that an alias will not expand recursively. Almost invariably, whatever we would like an alias to do could be accomplished much more effectively with a function.