Normally I have a .bashrc file where ll alias is set as
alias ll='ls -l'
When I invoke
ll manually, it works just fine. However, sometimes I may need to run command from a string. So I would like to run:
COMMAND="ll" bash --login -c "$COMMAND"
Unfortunately this complains that ll command is not found and fails. If I check alises it is indeed defined in this scope, I check like this:
COMMAND="alias" bash --login -c "$COMMAND"
the above mentioned prints all my aliases properly.
Is there any way to use aliased commands in bash's -c command_string parameter?