I'm working my way through the Wicked Cool Shell Scripts book. I've created a script, following the book's code, which can be found here. I'm trying to make an alias for this script so I can just call it from the terminal like a command. So, it can be used easily from any directory.
I've put the following code at the bottom of the script, run it and restarted the terminal, but it doesn't work.
alias formatdir='source ./shell_scripts/formatdir.sh'
I've searched online, but I haven't been able to get the programme to run just using an alias. Is this possible or am I misunderstanding what aliases do?