I have been working on creating new alias to use at work and noticed my .csh file filling with similar alias that go to different sub-directories but everything else is the same. I am newer at terminal alias and commands, and I was wondering if it was possible to create a catchall that can take the input and apply it to the alias as well as the directory?
Example:
alias ab1 "cd /home/drive/folder1/text/items && ll"
alias ab2 "cd /home/drive/folder2/text/items && ll"
alias ab3 "cd /home/drive/folder3/text/items && ll"
I was wanting to see if it was possible to have something like
alias ab* "cd /home/drive/folder*/text/items && ll"
And when I input ab2 it would auto fill the folder* directory to folder2.
When I use them, they are each run independently and very rarely run at the same time. I tried looking it up but was unsure on how to word it to correctly articulate my intention through search. Thank you ahead of time for any input.