I often write something like this:
cp -r folder-0.0.1 ~/temp
cp -r folder-0.2.2 ~/temp
cp -r folder-1.0.0 ~/temp
Template: <comand> <name>-<version> <path>
But instead, I'd like to write this:
do_something 0.0.1
do_something 0.2.2
do_something 1.0.0
Template: <alias> <version>
Can I do it easily in bash using aliases?
I would also like appropriate completion with tab key to work correctly. How can I program bash's completion to achieve this?
do_something () {
cp -r folder-"$1" ~/temp
}