I want to have a simple function or alias in my bashrc
that lists files with ls
using all my favorite options and pipes the output to more
.
Here is how it looks like
l() {
ls -lh --color $1 | more
}
However, when I call this function in a terminal with a wildcard argument, like l *.txt
, the blob is resolved before it gets passed to my function. The result is, that I only get the first txt
file displayed.
I am afraid that using a function is an overkill for what I want. Is there a way to do this without a function, with just a simple alias?