A simple example:
~/.bashsrc:
alias test1='ls'
Then we run alias test2='source ~/.bashsrc && test1'
.
If we run test2
, we will get error: test1: command not found
.
How to fix this issue? Or is there any way to realize it without change of bash file.