Be able to add variables within aliases where additional arguments are placed when running.
For example, if I want to run the following command as an alias:
find src -name "*.hs" | xargs wc -l
But, I want to vary the directory I'm searching and the pattern I'm searching for to make this alias more generic. So we could add new variables:
bk add alias count-lines='find $1 -name "$2" | xargs wc -l'
(I'm not sure of the best syntax for variables yet)
This would place the first argument to the alias as the directory we are searching for and the second argument as the pattern. This would make writing reusable aliases a lot easier!
Be able to add variables within aliases where additional arguments are placed when running.
For example, if I want to run the following command as an alias:
But, I want to vary the directory I'm searching and the pattern I'm searching for to make this alias more generic. So we could add new variables:
(I'm not sure of the best syntax for variables yet)
This would place the first argument to the alias as the directory we are searching for and the second argument as the pattern. This would make writing reusable aliases a lot easier!