So, I'm trying to create an alias which will run a command after sleeping x seconds.
alias ls_sleep="sleep $1 && ls"
The problem is, $1 is being passed as string and things like $(($1)) or $(($1+0)) doesn't work.
Would it be possible to make it work in a single line without using a function?
alias ls_sleep="sleep $1; ls"
instead and, see if you can spot what happens. Aliases aren't functions and they don't act like such. If you have some reason you can't use a function instead, you might want to think very hard how valid it is...